/* Add at the beginning of your CSS file */
:root {
    /* Light Mode Variables */
    --primary-color: #252758;
    --secondary-color: #2e4d69;
    --button-color: #252758;  
    --button-text-color: white;
    --button-hover-settings: transform 0.2s ease-in-out, background-color 0.2s ease-in-out, color 0.2s ease-in-out, border 1px solid dodgerblue;
    --button-hover-color: #2e4d69; /* Hover background color */
    --button-hover-border: 2px solid dodgerblue;
    --button-hover-shadow: ;
    --border-color: #252758;
    --ai-message-bg: #e7f2f6;
    --user-message-bg: #3e5d79;
    --error-color: #cc0000;
    --error-bg: #ffe6e6;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --text-color: #333;
    --bg-color: #edf3fd;
    --bg-color-inside: #f5f6f7;   /* inside the panels */
    --chat-bg: #ffffff;
    --menu-bg: #ffffff;
    --menu-hover: #f8f9fa;
    --menu-border: #252758;
    --input-border: #dee2e6;
    --input-bg: #ffffff;
    --toast-bg: #333;
    --toast-color: #ffffff;
    --border-radius: 8px;
    --transition: 0.4s ease;
    --font-family: 'Roboto', sans-serif; 
  
  }
  
  /* Dark Mode Variables */
  [data-theme="dark"] {
    --primary-color: #252758;
    --secondary-color: #385270;
    --border-color: #4a7ba3;
    --ai-message-bg: #2a3f52;
    --user-message-bg: #4a6f94;
    --error-color: #ff4444;
    --error-bg: #442222;
    --success-color: #2fb344;
    --warning-color: #ffd43b;
    --text-color: #e1e1e1;
    --bg-color: #10101b;
    --bg-color-inside: #464696;  /* inside the panels */
  
    --chat-bg: #242424;
    --menu-bg: #2d2d2d;
    --menu-hover: #363636;
    --menu-border: #404040;
    --input-border: #404040;
    --input-bg: #2d2d2d;
    --toast-bg: #2d2d2d;
    --toast-color: #e1e1e1;
    --border-radius: 8px;
  }
  
  
  
  
  
  
  
  
  /*
  
  /* Modern Minimal - Light Mode 
  :root {
    --background-color: #ffffff;
    --panel-background-color: #ffffff;
    --panel-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --button-color: #252758;
    --button-text-color: #ffffff;
    --button-hover-color: #ffaf8b;
    --button-hover-shadow: 0 0 8px rgba(255, 175, 139, 0.5);
    --text-color: #333;
  }
  */
  /* Modern Minimal - Dark Mode 
  [data-theme="dark"] {
    --background-color: #10101b;
    --bg-color-inside: #242424;
    --panel-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --border-color: transparent;
    --button-color: #252758;
    --button-text-color: #ffffff;
    --button-hover-color: #00c6ff;
    --button-hover-shadow: 0 0 8px rgba(0, 198, 255, 0.5);
    --text-color: #e1e1e1;
  }
  */
  
  
  
  /* Dynamic Bright - Light Mode 
  :root {
    --background-color: linear-gradient(to bottom, #ffffff, #e7f2f6);
    --bg-color-inside: #ffffff;
    --panel-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1);
    --border-color: #e0e0e0;
    --button-color: #ff6f61;
    --button-text-color: #ffffff;
    --button-hover-color: #3eb489;
    --button-hover-shadow: 0 0 8px rgba(62, 180, 137, 0.5);
    --text-color: #333;
  }
  */
  /* Techy Futuristic - Dark Mode
  [data-theme="dark"] {
    --background-color: linear-gradient(to bottom, #252758, #2e2e5e);
    --bg-color-inside: #242424;
    --panel-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --border-color: #00c6ff;
    --button-color: #252758;
    --button-text-color: #ffffff;
    --button-hover-color: #8a2be2;
    --button-hover-shadow: 0 0 8px rgba(138, 43, 226, 0.5);
    --text-color: #e1e1e1;
  }
  
   */
  
  /* Navy & Salmon Professional - Light Mode 
  :root {
    --background-color: linear-gradient(to bottom, #ffffff, #f8f9fa, #ffaf8b);
    --bg-color-inside: #ffffff;
    --panel-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --border-color: #252758;
    --button-color: #252758;
    --button-text-color: #ffffff;
    --button-hover-color: #ffaf8b;
    --button-hover-shadow: 0 0 8px rgba(255, 175, 139, 0.5);
    --text-color: #333;
  }
  */
  /* Sleek Gray - Dark Mode 
  [data-theme="dark"] {
    --background-color: #10101b;
    --bg-color-inside: #242424;
    --panel-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    --border-color: #ffd700;
    --button-color: #252758;
    --button-text-color: #ffffff;
    --button-hover-color: #ffd700;
    --button-hover-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    --text-color: #e1e1e1;
  }
  
  */
  
  
  
  
  
  
  
  
  
  
  
  
  
  /*
  
  :root {
      /* Light Theme *
      --primary-color: #2E5D79;
      --secondary-color: #5d9aa0;
      --chat-bg: #ffffff;
      --border-color: rgba(62, 93, 121, 0.1);
      --text-color: #333333;
  }
  
  [data-theme="dark"] {
      --primary-color: #3F78A0;
      --secondary-color: #5E92B5;
      --chat-bg: #242424;
      --border-color: rgba(255, 255, 255, 0.1);
      --text-color: #ffffff;
  }
  */
  
  
  
  /* Base Styles */
  body {
      color: var(--text-color);
      background-color: var(--bg-color);
      font-family: "Roboto", sans-serif;
      line-height: 1.6;
      scroll-behavior: smooth;
      margin: 0;
      padding: 0;
  /*    overflow-x: hidden;  */
      box-sizing: border-box;
  }
    
    
  
  
  /* Reset and Base Styles */
  *,
  *::before,
  *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
  }
  
  /* Fullscreen Background */
  .fullscreen-bg {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background-image: url('https://i.imgur.com/tUF359T.png');
      background-size: cover;
      background-repeat: no-repeat;
      background-attachment: fixed;
      z-index: -2;
  }
  
  
  
  
  
  
  
  
  @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
  }
  
  @keyframes slideChevron {
      0% { transform: translateX(0); }
      50% { transform: translateX(-5px); }
      100% { transform: translateX(0); }
  }
  
  .view-trigger:hover .animated-chevron {
      animation: slideChevron 0.5s infinite;
  }
  
  
  .view-change-notification {
      position: fixed;
      transform: translateX(-50%);
      background-color: rgba(0,0,0,0.7);
      color: white;
      padding: 10px 20px;
      border-radius: 5px;
      z-index: 900;
      transition: opacity 0.3s ease;
  }
  
  .view-trigger {
      position: relative !important;
      transition: all 0.3s ease;
      opacity: 1 !important;
      visibility: visible !important;
      z-index: 1000 !important;     /* Ensure it's always on top */
      pointer-events: auto;
      width: 80px;
      height: 50px;
      top: -200px;
      background: var(--primary-color, #252758);
      color: white;
      
      display: flex;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 2px solid #FF0000; /* bright red border   - containerr */
  }
  
  .view-trigger:hover {
      background-color: var(--secondary-color, #3F78A0);
      transform: translateX(-50%) scale(1.05);
  }
  
  .view-trigger svg {
      width: 40px;
      height: 40px;
      stroke: white;
      stroke-width: 2;
  }
  
  .error-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 15px;
  }
  
  .retry-btn, .create-btn {
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
  }
  
  .retry-btn {
      background-color: #ff4444;
      color: white;
  }
  
  .create-btn {
      background-color: #28a745;
      color: white;
  }
  
  
  
  /* Main Layout with Background Bar */
  .main-layout {
    position: relative; /* Ensure pseudo-element is positioned relative to this container */
    width: 100%;
    height: 100vh;
    display: flex;
    gap: 50px; /* Space between columns */
    padding-left: 0; /* Remove extra padding if present */
    overflow-y: hidden; /* Prevent layout scrolling */
    overflow-x: auto;
  }
  
  /* Background Blue Bar */
  .main-layout:before {
    content: ''; /* Pseudo-element to create the bar */
    position: absolute;
    top: 0;
    left: 0;
    width: 150%; /* Span the entire width of the layout */
    height: 60px; /* Height of the blue bar */
    background-color: var(--primary-color, #3F78A0); /* Navy blue color */
    z-index: 5; /* Send it behind all other content */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional shadow for depth */
  }
  
  /* Adjust Headers to Align with Background Bar *
  .column-header {
    position: relative;
    z-index: 10; /* Ensure headers appear above the blue bar *
  }
    */
  
  
  
  /* Column Header */
  .column-header {
      position: sticky;
      top: 0; /* Stick to the top of the column */
      z-index: 2000; /* Ensure it's above scrolling content */
      background: var(--primary-color, #3F78A0); /* Background color for the header */
      height: 60px; /* Adjust to your desired header height */
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px; /* Optional padding */
      overflow: hidden; /* Prevent content overflow */
  }
  
  /* Bottom Transparent Border Effect */
  .column-header::after {
      content: ''; /* Pseudo-element for the fade */
      position: absolute;
      bottom: 0; /* Positioned at the bottom of the header */
      left: 0;
      width: 100%; /* Span the entire width of the header */
      height: 50px; /* Height of the transparency effect */
      pointer-events: none; /* Ensure no interaction with the pseudo-element */
      background: linear-gradient(
          to bottom,
          rgba(63, 120, 160, 1),  /* Fully opaque at the header's bottom */
          rgba(63, 120, 160, 0)   /* Fully transparent below the header */
      );
      z-index: 1500; /* Layer it above the header */
      mix-blend-mode: multiply; /* Allows blending with the column content underneath */
      mask-image: linear-gradient(
          to bottom,
          rgba(0, 0, 0, 1),      /* Opaque black */
          rgba(0, 0, 0, 0)       /* Transparent black */
      );
      mask-composite: exclude; /* Excludes the mask for the effect */
      -webkit-mask-image: linear-gradient(
          to bottom,
          rgba(0, 0, 0, 1),
          rgba(0, 0, 0, 0)
      );
      -webkit-mask-composite: exclude;
  }
  
  
  
  
  
  /* Column Base Styles */
  .knowledge-stack,
  .navigator,
  .synergy-lab {
      flex: 0 0 auto; /* Prevent columns from growing or shrinking */
      height: 100vh; /* Full viewport height */
      overflow-y: auto; /* Enable individual column scrolling */
      overscroll-behavior-y: contain; /* Prevent scroll bouncing */
      scrollbar-width: thin;
      scrollbar-color: var(--primary-color) #f0f0f0;
      position: relative;
    margin-bottom: 50px;
        padding: 0 15px; /* Add padding to the left and right */
  }
  
  
  
  
  
  /* Specific Column Widths */
  .knowledge-stack {
      width: 1200px;
      max-width: 1200px;
  }
  
  .navigator {
      width: 700px;
      max-width: 700px;
  }
  
  .synergy-lab {
      width: 1200px;
      max-width: 1200px;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 1600px) {
      .main-layout {
          flex-direction: column;
          overflow-y: auto;
      }
  
      .knowledge-stack,
      .navigator,
      .synergy-lab {
          width: 100%;
          max-width: 100%;
          height: auto;
      }
  }
  
  
  
  
  
  .scroll-lock-btn {
      background: green;
      transition: all 0.3s ease;
      color: var(--button-text-color);
      border: 1px solid #e0e0e0;
      border-radius: 50%;  
      padding: 5px;
      display: flex;
      height: 30px;
      width: 30px;
      font-size: 12pt;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: var(--button-hover-settings);
      box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
      margin-bottom: 5px;
      background-color: var(--button-color); 
      
  }
  
  .scroll-lock-btn.active {
      border: 1px solid red;
      transform: scale(1.1);
  }
  
  .scroll-lock-btn i {
      transition: transform 0.3s ease;
        color: green;
  }
  
  .scroll-lock-btn.active i {
      transform: rotate(180deg);
        color: red;
  }
  
  
  
  
  
  /* Outer Containers with Consistent Scrollbar Space */
  .knowledge-stack, .navigator, .synergy-lab {
      position: relative; /* Ensure proper positioning */
      overflow-y: auto; /* Enable scrolling */
      scrollbar-gutter: stable; /* Reserve space for the scrollbar */
      padding-right: 16px; /* Adjust for custom scrollbar placement */
  }
  
  /* Custom Scrollbar Appearance */
  .knowledge-stack::-webkit-scrollbar, 
  .navigator::-webkit-scrollbar, 
  .synergy-lab::-webkit-scrollbar {
  
    width: 10px; /* Scrollbar width */
  }
  
  /* Thumb Styling */
  .knowledge-stack::-webkit-scrollbar-thumb, 
  .navigator::-webkit-scrollbar-thumb, 
  .synergy-lab::-webkit-scrollbar-thumb {
      background-color: green; /* Green thumb */
      border-radius: 4px; /* Rounded scrollbar thumb */
  }
  
      /* Scrollbar in normal state */
      .knowledge-stack::-webkit-scrollbar-thumb {
          background-color: #3F78A0;
          border-radius: 4px;
      }
  
      /* Scrollbar in hover state */
      .knowledge-stack.scrollbar-hover::-webkit-scrollbar-thumb {
          background-color: rgba(63, 120, 160, 0.7); /* More prominent color */
          box-shadow: 0 0 5px rgba(63, 120, 160, 0.5);
          transform: scale(1.1);
      }
  
      /* Firefox scrollbar hover state */
      .knowledge-stack.scrollbar-hover {
          scrollbar-color: rgba(63, 120, 160, 0.7) rgba(63, 120, 160, 0.2);
      }
  
  
  
  
  
  /* Sticky Sections (Preserved from previous styles) */
  .chat-section  { 
      position: sticky;
      align-self: flex-start;
      box-shadow: 
          0 5px 5px rgba(0, 0, 0, 0.2), 
          inset 0 -2px 10px rgba(0, 0, 0, 0.1);
  }
  
  
  
  
  /* Utility Classes */
  .text-center {
      text-align: center;
  }
  
  .w-100 {
      width: 100%;
  }
  /* Header with Fading Effect */
  .column-header {
      position: sticky;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 15px 5px;
      background: var(--primary-color, #3F78A0); /* Header background color */
      color: white;
      border-radius: 0px;  /* var(--border-radius, 0px) var(--border-radius, 0px) 0 0;  */
      height: 60px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Header shadow */
      width: 100%;
      overflow: hidden; /* Clip the gradient effect */
  }
  
  .column-header:after {
      content: "";
      position: absolute;
      bottom: -60px; /* Attach to the bottom edge of the header */
      left: 0;
      right: 0;
      height: 50px; /* Fade effect height */
      background: linear-gradient(to bottom, rgba(63, 120, 160, 1), rgba(63, 120, 160, 0));
      pointer-events: none; /* Allow interactions through the fade */
      z-index: 999; /* Ensure it's above column content */
  }
  
  
  .column-header-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      position: relative;
      z-index: 1000;
  }
  
  .column-header-left {
      display: flex;
      align-items: center;
      flex-grow: 1;
      margin-right: 20px;
      z-index: 1001;
  }
  
  .column-header-center {
      position: absolute;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  .column-header-right {
      display: flex;
      align-items: center;
      margin-left: auto;
      gap: 5px;
      z-index: 1001;
  }
  
  /* Header Title Styling */
  .column-header-center h1 {
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 30px;
      font-weight: 500;
      position: relative;
      z-index: 1000;
  }
  
  /* Button Styling */
  .column-header button {
      background: none;
      border: 1px solid var(--primary-color);
        color: white;
      cursor: pointer; /* Explicitly set cursor to pointer */
      padding: 5px;
      border-radius: 4px;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 4px;
      position: relative;
      z-index: 1002;
  }
  
  /* Button Hover and Active States */
  .column-header button:hover {
      background-color: rgba(255, 255, 255, 0.2);
      border: 1px solid dodgerblue;
      transform: scale(1.0);
  }
  
  .column-header button:active {
      transform: scale(0.95);
      background-color: rgba(255, 255, 255, 0.3);
  }
  
  /* Button Hover Tooltip */
  .column-header button:hover::after {
      content: attr(aria-label);
      position: absolute;
      bottom: -30px;
      left: 50%;
      transform: translateX(-50%);
      background-color: rgba(0,0,0,0.7);
      color: white;
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      z-index: 1003;
  }
  
  /* Button Icons */
  .column-header button i {
      width: 20px;
      height: 20px;
      pointer-events: none; /* Ensure icon doesn't interfere with button interactions */
  }
  
  /* Lock Button Specific Styling */
  .column-lock-btn {
      transition: all 0.3s ease;
  }
  
  .column-lock-btn.locked {
      color: #ff4d4d;
      transform: scale(1.1);
  }
  
  .column-lock-btn.unlocked {
      color: #4CAF50;
  }
  
  
  .column-lock-overlay {
      pointer-events: none;
      background-color: rgba(0,0,0,0.05);
  }
  
  
  
  
  
  
  /* Info Modal Styling */
  .column-info-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: none; /* Changed from flex to none by default */
      justify-content: center;
      align-items: center;
  
      z-index: 2000; /* Very high z-index to ensure it's above everything */
  }
  
  .info-modal-content {
      background: white;
      border-radius: 8px;
      max-width: 500px;
      width: 90%;
      padding: 20px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      position: relative;
      color: black;
  }
  
  .close-info-modal-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      background: none;
      border: none;
      color: #333;
      cursor: pointer;
      font-size: 20px;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 768px) {
      .column-header {
          flex-direction: column;
          gap: 10px;
      }
  
      .column-header-left, 
      .column-header-right {
          width: 100%;
          justify-content: center;
      }
  
      .column-header-center h1 {
          text-align: center;
      }
  }
  
  
  /* Sticky Spacer with Fade Effect */
  .spacer-header {
      position: sticky;
      top: 60px; /* Sticks directly below the header */
      z-index: 999; /* Layered above the content */
      height: 50px; /* Fade effect height */
    /*  background: linear-gradient(to bottom, rgba(63, 120, 160, 1), rgba(63, 120, 160, 0)); /* Gradient fade */
      pointer-events: none; /* Prevent interaction with the spacer */
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  /* Display Containers 
  .displayContainer {
      flex-grow: 1;
      overflow-y: auto;
      max-height: calc(100vh - 200px);
      scrollbar-width: thin;
      position: relative;
  }
  
  */
  
  /* AI Workspace */
  .synergy-lab-section, 
  .content-section,
  #chatSection,
  .document-viewer-container {
      background-color: white;
      border-radius: 6px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-sizing: border-box;
      max-width: 1200px;
      min-width: 400px;
      min-height: 400px;
      height: auto;
      margin-bottom: 50px;
      transition: height 0.3s ease-out;
      box-shadow: 
          0 0 20px rgba(0, 0, 0, 0.35),
          0 0 10px rgba(0, 0, 0, 0.23);
  }
  
  .multi-panel-container {
      transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  }
  
  .multi-panel-container.panel-moving-up {
      transform: translateY(-100%);
      opacity: 0.7;
  }
  
  .multi-panel-container.panel-moving-down {
      transform: translateY(100%);
      opacity: 0.7;
  }
  
  
  
  
  
  /*
  .view-trigger {
      position: fixed;
      width: 30px;
      height: 50px;
      background: var(--primary-color);
      border: none;
      border-radius: 4px;
      color: white;
      cursor: pointer;
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .view-trigger i {
      transition: transform 0.3s ease;
  }
  
  
  */
  
  .add-container-btn {
      margin: 10px;
      padding: 5px 10px;
      background-color: #3F78A0;
      color: white;
      border: none;
      border-radius: 5px;
  }
  
  .container-move-buttons {
      display: inline-flex;
      margin-left: 10px;
  }
  
  .container-move-buttons button {
      background: none;
      border: 1px solid #3F78A0;
      color: #3F78A0;
      padding: 2px 5px;
      margin: 0 2px;
      cursor: pointer;
  }
  
  .container-close-btn {
      background: none;
      border: none;
      color: red;
      font-size: 20px;
      cursor: pointer;
  }
  
  .url-input-container {
      display: flex;
      margin: 10px 0;
  }
  
  .url-input {
      flex-grow: 1;
      padding: 5px;
      margin-right: 10px;
  }
  
  .notification {
      background-color: #3F78A0;
      color: white;
      padding: 5px 10px;
      margin: 5px 0;
      border-radius: 3px;
  }
  
  
  .initialization-error {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: #fff3f3;
      border: 1px solid #ff4444;
      border-radius: 8px;
      padding: 20px;
      z-index: 9999;
      max-width: 400px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .initialization-error h3 {
      color: #ff4444;
      margin: 0 0 10px 0;
  }
  
  
  .retry-btn, .ignore-btn {
      background: #ff4444;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
  }
  
  .ignore-btn {
      background: #6c757d;
  }
  
  
  
  
  .floating-add-container-btn {
      position: fixed;  /* or absolute depending on layout */
      bottom: 20px;     /* Adjust based on your design */
      right: 20px;      /* Adjust based on your design */
      width: 50px;      /* Square button */
      height: 50px;
      background-color: #3F78A0;  /* Your brand color */
      color: white;
      border: none;
      border-radius: 50%;  /* Circular */
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      cursor: pointer;
      z-index: 1000;     /* Ensure it's above other elements */
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .floating-add-container-btn:hover {
      background-color: #2E5D79;  /* Slightly darker on hover */
      transform: scale(1.1);      /* Slight grow effect */
  }
  
  .floating-add-container-btn svg {
      stroke: white;
      width: 24px;
      height: 24px;
  }
  
  @keyframes buttonPulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.1); }
      100% { transform: scale(1); }
  }
  
  .floating-add-container-btn.button-pulse {
      animation: buttonPulse 0.3s ease;
  }
  
  
  .scroll-indicator {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 4px;
      background-color: rgba(0,0,0,0.1);
  }
  
  .scroll-progress {
      height: 100%;
      background-color: #3F78A0;
      width: 0;
      transition: width 0.2s ease;
  }
  
  .scroll-nav-container {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      gap: 10px;
  }
  
  .scroll-nav-container button {
      background-color: rgba(63, 120, 160, 0.1);
      border: none;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .scroll-nav-container button:hover {
      background-color: rgba(63, 120, 160, 0.2);
  }
  
  .scroll-nav-container button svg {
      width: 24px;
      height: 24px;
      fill: #3F78A0;
  }
  
  
  
  /* Unified Header Styles */
  .workspace-header, 
  .content-header {
      padding: 15px 20px;
      background: var(--primary-color);
      color: white;
      border-radius: var(--border-radius) var(--border-radius) 0 0;
      min-height: 60px;
      display: flex;
      justify-content: space-between;
      align-items: center;
  /*     position: sticky;  */ 
      top: 0;
  
  }
  
  /* Left Section Styles */
  .workspace-header-left, 
  .content-header-left {
      display: flex;
      align-items: center;
      flex-grow: 1;
      margin-right: 20px;
  }
  
  .workspace-header-left h2, 
  .content-header-left h2 {
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-size: 24px;
      font-weight: 500;
  }
  
  /* Right Section Styles */
  .workspace-header-right, 
  .content-header-right {
      display: flex;
      align-items: center;
      margin-left: auto;
      gap: 5px;
      
  }
  
  .workspace-header-right button, 
  .content-header-right button {
      background: none;
      border: 1px solid var(--primary-color);
      color: white;
      cursor: pointer;
      padding: 5px;
      border-radius: 4px;
      transition: background-color 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 5px;
    
  }
  
  .workspace-header-right button:hover, 
  .content-header-right button:hover {
      background-color: rgba(255, 255, 255, 0.2);
    
  }
  
  /* Icon Styles */
  .workspace-header-right button svg, 
  .content-header-right button svg {
      width: 20px;
      height: 20px;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 768px) {
      .workspace-header, 
      .content-header {
          flex-direction: column;
          gap: 10px;
      }
  
      .workspace-header-left, 
      .workspace-header-right,
      .content-header-left, 
      .content-header-right {
          width: 100%;
          justify-content: center;
      }
  
      .workspace-header-left h2, 
      .content-header-left h1 {
          text-align: center;
      }
  }
  
  /* Additional Hover and Focus States */
  .workspace-header-right button:focus, 
  .content-header-right button:focus {
      outline: 2px solid rgba(255, 255, 255, 0.5);
      outline-offset: 2px;
  }
  
  /* Accessibility and Interaction */
  .workspace-header-right button:active, 
  .content-header-right button:active {
      transform: scale(0.95);
  }
  
  /* Content Section Scrollbar */
  .content-section::-webkit-scrollbar {
      width: 6px;
  }
  
  .content-section::-webkit-scrollbar-track {
      background: var(--scrollbar-track);
      border-radius: 4px;
  }
  
  .content-section::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border-radius: 4px;
  }
  
  /* Content Controls Container */
  .content-controls {
      padding: 0px 20px;
      background-color: var(--bg-color-inside);
      border-bottom: 0px solid var(--border-color);
      display: flex;
        justify-content: space-between;
      align-items: center;
      gap: 10px;
  }
  
  
  
  /* ======= SELECTION REVIEW PANEL STYLES ======= */

  /* Panel Container */
  .selection-review-workspace {
    background-color: var(--bg-color-inside);
    border-radius: 8px;
    margin-bottom: 50px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.35), 0 0 10px rgba(0, 0, 0, 0.23);
  }
  
  .selection-contents-container {
    flex-grow: 1;
    width: calc(100% - 20px);
    min-height: 300px;
    max-height: calc(100vh - 350px);
    margin: 20px;
    margin-bottom: 0;
    padding: 20px;
    background-color: white;
    border: 1px solid #252758;
    border-radius: 0px;
    overflow-y: auto;
    color: #333;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    transition: height 0.3s ease-out;
  }
  
  .selection-metadata-summary {
    margin-left: 20px;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
  }
  
  /* ======= SELECTION ITEMS ======= */
  
  /* Consistent naming using .selection-item as the standard */
  .selection-item,
  .selected-content-container {
    position: relative;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 10px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .selection-item:hover,
  .selected-content-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #252758);
  }
  
  .selection-item.selected,
  .selected-content-container.selected {
    border: 2px solid var(--primary-color, #252758);
    background-color: rgba(37, 39, 88, 0.05);
  }
  
  .selection-content {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    min-height: 50px;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .selection-type {
    display: inline-block;
    font-size: 12px;
    padding: 3px 8px;
    background-color: var(--primary-color, #252758);
    color: white;
    border-radius: 3px;
    margin-bottom: 8px;
  }
  
  /* Selection highlight */
  ::selection {
    background-color: rgba(62, 93, 121, 0.2);
    color: inherit;
  }
  
  /* ======= EDIT CONTROLS ======= */
  
  /* Edit/Delete controls within items */
  .edit-delete-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .selection-item:hover .edit-delete-controls,
  .selected-content-container:hover .edit-delete-controls {
    opacity: 1;
  }
  
  /* Edit Mode */
  .selection-item.editing .selection-content,
  .selected-content-container.editing .selection-content {
    display: none;
  }
  
  .selection-editor,
  .markdown-editor,
  .plotly-editor,
  .mermaid-editor {
    width: 100%;
    min-height: 200px;
    border: 1px solid var(--primary-color, #252758);
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
    font-family: monospace;
    line-height: 1.5;
  }
  
  .markdown-input, 
  .plotly-json-input, 
  .mermaid-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: both;
    min-height: 200px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #ddd;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
  }
  
  .markdown-preview, 
  .mermaid-preview {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 200px;
    background-color: #f8f9fa;
  }
  
  .editor-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
  }
  
  /* ======= BUTTON STYLES ======= */
  
  /* Standardized button styling for all buttons in Selection Review */
  .loadButton, .exportPdfButton, .exportDocButton, .clearButton,
  .submitButton, .saveButton, .exportButton, .sectionButton,
  .refreshButton, .copyChatButton, .workspace-move-down-btn,
  .workspace-close-btn, .workspace-move-up-btn, .workspace-expand-btn,
  .send-selections-btn, .clear-selections-btn, .instantActionsButton,
  .contentUndoButton, .btn-outline-primary, .SelectionEditButton,
  .send-to-selection-review-btn, .selection-review-btn, .select-for-review-btn,
  .editor-controls button, .edit-btn, .delete-btn, .apply-changes-btn, .cancel-edit-btn,
  .save-markdown-btn, .cancel-markdown-btn, .save-plotly-btn, .cancel-plotly-btn,
  .save-mermaid-btn, .cancel-mermaid-btn {
    padding: 8px 12px;
    margin-left: 6px;
    background-color: var(--button-color, #252758);
    color: var(--button-text-color, white);
    border-radius: 4px;
    border: 2px solid (--button-color, #252758);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
/*    box-shadow: 0 2px 3px rgb(255, 255, 255); */
    box-shadow: 0px 2px 2px rgb(252, 250, 250);
    height: 36px;
    white-space: nowrap; /* Prevent text wrapping */
    cursor: pointer;
    min-width: 36px;
    width: auto;
    transition: all 0.3s ease;
  }
  

  .delete-btn {
    padding: 5px 5px;
  }


/*
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 5px;
}

.menu-button.active {
  background-color: #f0f0f0;
}

.menu-button:hover {
  transform: scale(1.1);
  background-color: var(--button-hover-color);
   border-color: 1px solid dodgerblue;

*/

  /* Hover states for all enabled buttons */
  .loadButton:hover:not(:disabled),
  .exportPdfButton:hover:not(:disabled),
  .exportDocButton:hover:not(:disabled),
  .clearButton:hover:not(:disabled),
  .submitButton:hover:not(:disabled),
  .saveButton:hover:not(:disabled),
  .exportButton:hover:not(:disabled),
  .sectionButton:hover:not(:disabled),
  .refreshButton:hover:not(:disabled),
  .copyChatButton:hover:not(:disabled),
  .workspace-move-down-btn:hover:not(:disabled),
  .workspace-close-btn:hover:not(:disabled),
  .workspace-move-up-btn:hover:not(:disabled),
  .workspace-expand-btn:hover:not(:disabled),
  .send-selections-btn:hover:not(:disabled),
  .clear-selections-btn:hover:not(:disabled),
  .instantActionsButton:hover:not(:disabled),
  .contentUndoButton:hover:not(:disabled),
  .btn-outline-primary:hover:not(:disabled),
  .SelectionEditButton:hover:not(:disabled),
  .send-to-selection-review-btn:hover:not(:disabled),
  .selection-review-btn:hover:not(:disabled),
  .select-for-review-btn:hover:not(:disabled),
  .editor-controls button:hover:not(:disabled),
  .edit-btn:hover:not(:disabled),
  .delete-btn:hover:not(:disabled),
  .apply-changes-btn:hover:not(:disabled),
  .cancel-edit-btn:hover:not(:disabled),
  .save-markdown-btn:hover:not(:disabled),
  .cancel-markdown-btn:hover:not(:disabled),
  .save-plotly-btn:hover:not(:disabled),
  .cancel-plotly-btn:hover:not(:disabled),
  .save-mermaid-btn:hover:not(:disabled),
  .cancel-mermaid-btn:hover:not(:disabled) {
/*    transform: scale(1.0); */
    border: 2px solid dodgerblue;
    background-color: var(--secondary-color, #3e5d79);
    box-shadow: 0 0 10px rgba(63, 120, 160, 0.5);
    transition: all 0.3s ease;

    
  }
  
  /* Active/Click states for all enabled buttons */
  .loadButton:active:not(:disabled),
  .exportPdfButton:active:not(:disabled),
  .exportDocButton:active:not(:disabled),
  .clearButton:active:not(:disabled),
  .submitButton:active:not(:disabled),
  .saveButton:active:not(:disabled),
  .exportButton:active:not(:disabled),
  .sectionButton:active:not(:disabled),
  .refreshButton:active:not(:disabled),
  .copyChatButton:active:not(:disabled),
  .workspace-move-down-btn:active:not(:disabled),
  .workspace-close-btn:active:not(:disabled),
  .workspace-move-up-btn:active:not(:disabled),
  .workspace-expand-btn:active:not(:disabled),
  .send-selections-btn:active:not(:disabled),
  .clear-selections-btn:active:not(:disabled),
  .instantActionsButton:active:not(:disabled),
  .contentUndoButton:active:not(:disabled),
  .btn-outline-primary:active:not(:disabled),
  .SelectionEditButton:active:not(:disabled),
  .send-to-selection-review-btn:active:not(:disabled),
  .selection-review-btn:active:not(:disabled),
  .select-for-review-btn:active:not(:disabled),
  .editor-controls button:active:not(:disabled),
  .edit-btn:active:not(:disabled),
  .delete-btn:active:not(:disabled),
  .apply-changes-btn:active:not(:disabled),
  .cancel-edit-btn:active:not(:disabled),
  .save-markdown-btn:active:not(:disabled),
  .cancel-markdown-btn:active:not(:disabled),
  .save-plotly-btn:active:not(:disabled),
  .cancel-plotly-btn:active:not(:disabled),
  .save-mermaid-btn:active:not(:disabled),
  .cancel-mermaid-btn:active:not(:disabled) {
    transform: scale(1.0);
    box-shadow: 0 1px 2px rgba(240, 240, 240, 0.2);
  }
  


  
  
  
  /* Toast Notifications */
  .toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  
  /* Confirm Dialog */
  .confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1100;
  }
  
  .confirm-dialog.show {
    opacity: 1;
  }
  
  .confirm-dialog-content {
    background: white;
    padding: 24px;
    border-radius: 8px;
    min-width: 300px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .confirm-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
  }
  
  
  
  
  
  
  
  /* Animations */
  @keyframes messageSlide {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes pulse {
    0% {
      opacity: 0.5;
    }
    50% {
      opacity: 1;
    }
    100% {
      opacity: 0.5;
    }
  }
  
  
  /* Accessibility */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
  
  
  
  
  
  
  

  
  
  
  
  
  
  
  /* [ VALOR AI Phone Report Panel ] */
  
  .parentContainer h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 40px;
    color: #252758;   
  }
  
  .parentContainer h2 {
    font-size: 28px;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    color: #252758; 
  }
  
  .parentContainer h3 {
    font-size: 20px;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    color: #252758;   
  }  
  
  .parentContainer p {
    margin-bottom: 15px;
  }
  
  
  
  /* Report Container */
  .parentContainer {
    background-color: var(--bg-color-inside);
    border-radius: 0px;
    width: 100%;
  /*  max-width: 900px;  */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    border: 0px solid #a04a3f;
    position: relative;
    padding-bottom: 60px;
      min-width: 800px;
      min-height: 600px; /* Match smallest size */
      height: auto; /* Let it grow with content */
      transition: height 0.3s ease-out;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.22),
        0 6px 12px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(63, 120, 160, 0.0);    /* change the last value to 0.35 for a faint border */
    
  }
  
  
  .size-transition {
      transition: height 0.3s ease-out !important;
  }
  

  .displayContainer { 
    align-items: center;
    flex-grow: 1; 
    width: calc(100% - 40px); 
    max-height: calc(100vh - 5px);
    background-color: white; 
    overflow: visible; 
    position: relative; 
    min-height: 600px; 
    margin: 20px;
    margin-top: 0px;
    margin-bottom: 0px;
    border-radius: 0px; 
    border: 1px solid #252758;
    font-family: 'Roboto', sans-serif; 
    transition: height 0.3s ease-out;
    display: flex !important;
    flex-direction: column !important;
  }
 


  /* Scrollbar for displayContainer */
  .displayContainer {
    overflow-y: auto; /* Enable vertical scroll */
    scrollbar-width: none; /* Hide the scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide for IE/Edge */
    transition: all 0.3s ease;
}


  .contentContainer { 
    position: relative;
    flex-direction: column !important;
    width: 100%;
    width: calc(100% - 40px); 
    height: calc(100% - 20px);
    overflow-y: auto;
    padding: 30px; 
    color: #333; 
    box-sizing: border-box;
    padding-top: 10px;
    border: 0px solid #28a745;
  
  }
  
  .bottomControlsContainer { 
    min-height: 60px; 
    max-height: 90px; 
    padding: 10px;
    margin-bottom: 0px;
    margin-left: 5px;
    background-color: var(--bg-color-inside); 
    border-top: 0px solid #f10f0f; 
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    z-index: 100;
  }
  
  .topControlsContainer {
    height: 60px;
    padding: 10px;
    margin-left: 5px;
    background-color: var(--bg-color-inside);
    border-bottom: 0px solid #ccc;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
  }

  
  
  
  /* General styles for a floating message */
  .floating-message {
      position: relative;
      margin: 50px 0; /* 50px margin above and below the entire message */
  
  }
  
  /* Top shadow effect */
  .floating-message.top {
      box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5); /* Shadow upward */
  }
  
  /* Bottom shadow effect */
  .floating-message.bottom {
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Shadow downward */
  }
  
  
  /* Message header: Positioned 10px below the top edge */
  .message-header {
      position: absolute; /* Ignore padding */
      top: 10px; /* 10px below the top line */
      left: 20px; /* Aligns with left padding */
      right: 20px; /* Aligns with right padding */
      display: flex;
      background: transparent;
      border: 0px;
      justify-content: space-between;
      align-items: baseline;
      z-index: 1; /* Stays above other content */
  }
  
  /* Time and date styles */
  .message-time {
      font-weight: bold;
      color: #333;
  }
  
  .message-date {
      color: #666;
  }
  
  .message-number {
      font-weight: bold;
      color: #555;
  }
  
  /* Message content */
  .message-content {
      margin-top: 70px; /* Ensures spacing below header */
  }
  
  
  
  /*
  .progressBarContainer {
    height: 10px;
    background-color: var(--bg-color-inside);
    overflow: hidden;
    position: relative;
    z-index: 10;
    margin-bottom: 5px;
  }
  */
  .resizeHandle {
    position: absolute;
    bottom: 70px;
    left: 0;
    right: 0;
    height: 10px;
  /*  background-color: #2E5D79;  */
    cursor: ns-resize;
      transition: background-color 0.3s ease;
  }
  
  
  .submitControlsContainer {
    height: 50px;
    padding: 10px;
    background-color: white;
    display: flex;
    align-items: center;
  }
  /*
  .progressBar {
    height: 100%;
    width: 0;
    background-color: #3F78A0;
    transition: width 0.3s ease, opacity 0.9s ease;
    opacity: 0;
  }
  
  .progressBar.active {
    opacity: 1;
  }
  
  .progressBar.complete {
    background-color: #1F51FF;
  }
  */
  .graphsContainer {
    max-width: 100%;
    padding-left: 50px;
    padding-right: 50px;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #3F78A0;
  }
  
  /* Refresh and Undo buttons inside content */
  .contentRefreshButton, .contentUndoButton {
    position: absolute;
    top: 5px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 5px;
    font-size: 12x;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
    height: 25px; /* Standardized height */
  }
  
  .contentRefreshButton {
    right: 5px;

  }
  
  .contentUndoButton {
    left: 0px;
  }
  
  
  
  .displayContainer::-webkit-scrollbar { 
    width: 6px; 
  } 
  
  .displayContainer::-webkit-scrollbar-track { 
    background-color: #f0f0f0; 
    border-radius: 4px; 
  } 
  
  
  
  .displayContainer::-webkit-scrollbar-thumb { 
    background-color: #252758;
    border-radius: 4px; 
    transition: all 0.3s ease; 
  } 
  
  .contentContainer::-webkit-scrollbar-thumb:hover { 
    background-color: #4E92B5;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  /* [ Plotly Container Styles ]  */
  .plotly-container {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    min-height: 500px;
      border: 1px solid #e0e0e0;
      transition: border 0.3s ease, box-shadow 0.3s ease;
  }
  
  
  .plotly-container:hover {
    border: 0.5px solid #4E92B5;             
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.3);
  }
  
  .plotly-refresh-button {
    position: absolute;
    top: 0px;
    right: 10px;
    background-color: #252758;
    border: 0px solid #4E92B5;
    border-radius: 4px;
    padding: 5px 10px;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 12px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .plotly-refresh-button:hover {
    background-color: #4E92B5;
  }
  
  .plotly-resize-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 20px;
    height: 40px;
    background-color: #252758;
    border: 1px solid #4E92B5;
    border-radius: 4px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .plotly-resize-button::before {
    content: '↕';
    font-weight: bold;
  }
  
  .plotly-resize-button:hover {
    background-color: #4E92B5;
  }
  
  .plotly-container .modebar {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: #252758;
    border-radius: 4px;
    padding: 5px;
  }
  
  .plotly-container:hover .modebar,
  .plotly-container:hover .plotly-refresh-button,
  .plotly-container:hover .plotly-resize-button {
    opacity: 1;
  }
  
  .plotly-container .modebar-btn path {
    fill: #FFFFFF !important;
  }
  
  .plotly-container .modebar-btn[data-title="Produced with Plotly"] {
    display: none !important;
  }
  
  .plotly-container .modebar-container {
    right: 40px !important;
  }
  
  
  
  
  
  
  /* Modal Styles */
  .plotly-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  .plotly-modal-content {
      background: white;
      padding: 20px;
      border-radius: 10px;
      max-width: 90%;
      max-height: 90%;
      width: 80vw;
      height: 80vh;
      overflow: hidden;
      position: relative;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .plotly-modal-close {
      position: absolute;
      top: 10px;
      right: 10px;
      background: #f44336;
      color: white;
      border: none;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  /* Button Styles */
  .plotly-export-button,
  .plotly-expand-modal {
      position: absolute;
      top: 10px;
      right: 10px;
      z-index: 10;
      background-color: #f0f0f0;
      border: 1px solid #ccc;
      padding: 5px 10px;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .plotly-export-button:hover,
  .plotly-expand-modal:hover {
      background-color: #e0e0e0;
  }
  
  .plotly-export-button {
      right: 60px;
  }
  
  /* Error Styles */
  .plotly-error,
  .plotly-render-error {
      padding: 20px;
      background-color: #ffebee;
      color: #d32f2f;
      text-align: center;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 768px) {
      .plotly-modal-content {
          width: 95%;
          height: 95%;
      }
  }
  
  
  
  
  
  
  .displayContainer, #graphsContainer, #parentContainer {
    transition: height 0.3s ease-out;
  }
  
  
  
  
  /* [ Notification Area Styles ]  */
  .notificationArea {
    width: 100%;
    margin-left: 20px;
    margin-right: 20px;
    color: #333;
    font-size: 11pt;
    font-style: italic;
    text-overflow: ellipsis;
  }
  
  
  
  
  
  /* [ Cell Selector Styles ] */
  .cellSelector {
    padding: 8px;
    min-width: 250px;
    margin-right: 10px;
    margin-left: 10px;
    text-overflow: ellipsis;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    font-size: 12pt;
    background-color: white;
    color: #333;
  }
  
  .cellSelector:hover, #cellSelector:focus {
    outline: 3px #252758;
    border-color: #5d9aa0; 
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s;
  }
  
  /* [ Container Styles ] */
  .item-container, .graph-container  { /* , .mermaid-container {  */
    margin-bottom: 20px;
    border: 0px solid #00FF00;
    border-radius: 8px;
    overflow: hidden;

    transition: all 0.3s ease;
  }
  
  .leftControls, .rightControls { 
    display: flex; 
    align-items: center; 
    padding-right: 10px; 
  }
  
  .rightControls { 
    gap: 10px; 
  }
  
  
  /* DOCUMENT/REPORT STYLING STANDARDS
     DOC = Document Elements
     RPT = Report Elements
     STD = Standard/Default Values */
  
  /* DOC-BASE: Core Document Container
     STD: Max-width for readability, auto margins for centering */
  .document-content {
      max-width: 800px;
      margin: 0 auto;
      padding: 40px;
      line-height: 1.8;
      font-size: 16px;
      text-align: left;
  }
  
  /* RPT-TITLE: Report Title Style
     STD: 36px size, extra margin, bold weight */
  .report-title {
      font-size: 36px;
      color: #3E5D79;
      margin: 40px 0 30px;
      text-align: center;
      font-weight: 700;
      line-height: 1.2;
  }
  
  /* RPT-SUBTITLE: Report Subtitle
     STD: 24px size, lighter weight, secondary color */
  .report-subtitle {
      font-size: 24px;
      color: #5E92B5;
      margin: 20px 0;
      text-align: center;
      font-weight: 400;
  }
  
  /* RPT-SECTION: Major Section Headers
     STD: 28px size, top border, spacing */
  .report-section {
      font-size: 28px;
      color: #3E5D79;
      margin: 50px 0 30px;
      padding-top: 30px;
      border-top: 2px solid #eee;
      text-align: left;
      font-weight: 600;
  }
  
  /* RPT-SUBSECTION: Subsection Headers
     STD: 22px size, bottom border */
  .report-subsection {
      font-size: 22px;
      color: #5E92B5;
      margin: 30px 0 20px;
      padding-bottom: 10px;
      border-bottom: 1px solid #eee;
      text-align: left;
  }
  
  /* DOC-ABSTRACT: Abstract/Executive Summary
     STD: Indented, italic intro, bordered */
  .document-abstract {
      margin: 40px 0;
      padding: 30px;
      background: #f8f9fa;
      border-left: 4px solid #3E5D79;
      font-size: 16px;
  }
  
  /* DOC-ABSTRACT-TITLE: Abstract Title
     STD: Bold, centered, caps */
  .abstract-title {
      text-transform: uppercase;
      text-align: center;
      font-weight: 700;
      margin-bottom: 20px;
      letter-spacing: 1px;
  }
  
  /* RPT-KEYFINDINGS: Key Findings Section
     STD: Highlighted background, special formatting */
  .report-keyfindings {
      background: #f8f9fa;
      padding: 25px;
      margin: 30px 0;
      border-radius: 8px;
  }
  
  /* RPT-FINDING: Individual Finding
     STD: Left border accent, spacing */
  .report-finding {
      padding-left: 20px;
      margin: 15px 0;
      border-left: 3px solid #5E92B5;
  }
  
  /* DOC-QUOTE: Block Quotes
     STD: Indented, italic, bordered */
  .document-quote {
      margin: 30px 60px;
      padding: 20px;
      font-style: italic;
      border-left: 3px solid #5E92B5;
      background: #f8f9fa;
  }
  
  /* RPT-DATA: Data Presentation
     STD: Monospace numbers, right-aligned */
  .report-data {
      font-family: 'Roboto Mono', monospace;
      text-align: right;
  }
  
  /* RPT-FOOTNOTE: Footnotes
     STD: Smaller size, top border */
  .report-footnote {
      font-size: 14px;
      color: #666;
      margin-top: 40px;
      padding-top: 20px;
      border-top: 1px solid #eee;
  }
  
  /* RPT-REFERENCE: References Section
     STD: Hanging indent, smaller text */
  .report-reference {
      font-size: 14px;
      padding-left: 25px;
      text-indent: -25px;
      margin-bottom: 15px;
  }
  
  /* DOC-APPENDIX: Appendix Sections
     STD: Different background, smaller text */
  .document-appendix {
      background: #f8f9fa;
      padding: 30px;
      margin: 40px 0;
      font-size: 14px;
      border-radius: 8px;
  }
  
  /* RPT-METHODOLOGY: Methodology Section
     STD: Technical formatting, code-like */
  .report-methodology {
      font-family: 'Roboto Mono', monospace;
      background: #f8f9fa;
      padding: 25px;
      margin: 30px 0;
      font-size: 14px;
      line-height: 1.6;
      border-radius: 8px;
  }
  
  /* RPT-TABLE-TITLE: Table Titles
     STD: Bold, centered, spacing */
  .report-table-title {
      font-weight: 700;
      text-align: center;
      margin: 20px 0 10px;
      font-size: 16px;
  }
  
  /* RPT-FIGURE: Figure Containers
     STD: Centered, captioned */
  .report-figure {
      margin: 40px 0;
      text-align: center;
  }
  
  /* RPT-CAPTION: Figure Captions
     STD: Smaller, centered, italic */
  .report-caption {
      font-size: 14px;
      color: #666;
      text-align: center;
      font-style: italic;
      margin-top: 10px;
  }
  
  
  
  
  /*  [ Conclusion Section ] */
  .conclusion {
      margin-top: 40px;
      font-style: italic;
  }
  
  
  
  /* [ Loading Spinner Styles ] */
  .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(62, 93, 121, 0.3);
    border-radius: 50%;
    border-top-color: #3E5D79;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  @media (max-width: 768px) {
    .parentContainer {
      width: 95%;
    }
  
    .topControlsContainer, .bottomControlsContainer {
      flex-direction: column;
      align-items: stretch;
    }
  
    button, select {
      width: 100%;
      margin-bottom: 10px;
    }
  }
  
  
  .report-sizeControls {
      position: absolute;
      top: 10px;
      right: 10px;
      display: flex;
      align-items: center;
      z-index: 10;
  }
  
  .report-decreaseSize,
  .report-increaseSize {
      width: 30px;
      height: 30px;
      padding: 0;
      margin: 0 5px;
      border-radius: 5px;
      font-size: 15pt;
      background-color: #252758;
      color: white;
      border: none;
      cursor: pointer;
      transition: var(--button-hover-settings);
          border: 2px solid var(--primary-color);
  
  
  }
  
  
  
  /* Report Button Disabled States */
  .report-decreaseSize:disabled,
  .report-increaseSize:disabled {
      background-color: #cccccc;
      cursor: not-allowed;
      opacity: 0.6;
      box-shadow: none;
      transform: none;
  }
  
  
  /* Hover states for enabled buttons only */
  .report-decreaseSize:hover:not(:disabled),
  .report-increaseSize:hover:not(:disabled) {
    transform: scale(1.0);
          border: 2px solid dodgerblue;
    background-color: var(--button-hover-color);
  }
  /* Active/Click states for enabled buttons */
  .report-decreaseSize:active:not(:disabled),
  .report-increaseSize:active:not(:disabled) {
    transform: scale(1.1);
  }
  
  
  .report-sizeDisplay {
      font-size: 14px;
      margin: 0 5px;
  }
  
  
  
  /* Focus styles for accessibility */
  button:focus, .cellSelector:focus {
      outline: 2px solid #007bff;
      outline-offset: 2px;
  }
  
  
  /* MD = Markdown
     TC = Text Content
     STD = Standard/Default Values */
  
  /* Basic Markdown Content Base Styles 
     MD-BASE: Core markdown container styling
     STD: Roboto font, 1.6 line height, 20px padding */
  .markdown-content {
      font-family: "Roboto", sans-serif;
      line-height: 1.6;                          
      color: #333;                               
      padding: 20px;                             
      text-align: left;                          /* Added explicit left alignment */
  }
  
  /* MD-H1: Primary Heading Style
     STD: 32px size, primary blue color, 20px margins */
  .markdown-content h1 {
      font-size: 32px;
      color: #2C3E50;     /* Primary brand blue */
      margin: 20px 0;
      text-align: center; /* Headers remain centered */
  }
  
  /* MD-H2: Secondary Heading Style
     STD: 24px size, secondary blue color, 15px margins */
  .markdown-content h2 {
      font-size: 24px;
      color: #2C3E50;     /* Secondary brand blue */
      margin: 15px 0;
      text-align: center;
  }
  
  /* MD-H3: Tertiary Heading Style
     STD: 20px size, dark gray color, 10px margins */
  .markdown-content h3 {
      font-size: 20px;
      color: #404A59;    /* Dark gray */
      margin: 10px 0;
      text-align: center;
  }
  
  
  /* Additional Markdown Styles */
  .markdown-content h4 {
      font-size: 18px;
      color: #404A59;
      margin: 10px 0;
      text-align: left;
  }
  
  /* MD-P: Paragraph Style
     STD: 15px bottom margin, left-aligned */
  .markdown-content p {
      margin-bottom: 15px;
      text-align: left;
  }
  
  /* TC-BOLD: Bold Text Style
     STD: 600 weight, primary blue color */
  .markdown-content strong {
      font-weight: 600;
      color: #3E5D79;    /* Primary brand blue */
  }
  
  /* TC-EM: Emphasis/Italic Style
     STD: Italic style, secondary blue color */
  .markdown-content em {
      font-style: italic;
      color: #5E92B5;    /* Secondary brand blue */
  }
  
  /* MD-UL: Unordered List Style
     STD: Disc bullets, 20px left padding, 15px margins */
  .markdown-content ul {
      list-style-type: disc;
      margin: 15px 0;
      padding-left: 20px;
      text-align: left;
  }
  
  /* MD-OL: Ordered List Style
     STD: 20px left padding, 15px margins */
  .markdown-content ol {
      margin: 15px 0;
      padding-left: 20px;
      text-align: left;
  }
  
  /* MD-LI: List Item Style
     STD: 8px bottom margin */
  .markdown-content li {
      margin-bottom: 8px;
      text-align: left;
  }
  
  /* MD-TBL: Table Base Style
     STD: Full width, collapsed borders, 20px bottom margin */
  .markdown-table {
      border-collapse: collapse;
      width: 100%;
      margin-bottom: 20px;
  }
  
  /* MD-TBL-CELL: Table Cell Style
     STD: Light gray border, 8px padding, left-aligned */
  .markdown-table th,
  .markdown-table td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: left;
  }
  
  /* MD-TBL-HEAD: Table Header Style
     STD: Brand blue background, white text */
  .markdown-table thead th {
      background-color: #3F78A0;
      color: white;
  }
  
  /* MD-TBL-ALT: Alternating Row Style
     STD: Light gray background for even rows */
  .markdown-table tbody tr:nth-child(even) {
      background-color: #f9f9f9;
  }
  
  /* MD-ERR: Error Message Style
     STD: Red text/border, light red background, 4px radius */
  .error-message {
      color: #ff0000;
      padding: 10px;
      background: #ffe6e6;
      border: 1px solid #ff0000;
      border-radius: 4px;
  }
  
  .markdown-content hr {
      border: 0;
      height: 1px;
      background: #3E5D79;
      margin: 20px 0;
  }
  
  .markdown-content strong {
      font-weight: 600;
      color: #3E5D79;
  }
  
  .markdown-content em {
      font-style: italic;
      color: #5E92B5;
  }
  
  
  /* Style for short, bold subsection titles */
  .markdown-content p strong:first-child:last-child,
  .markdown-content p strong:first-child:nth-last-child(2) {
      display: inline-block;
      color: #2C3E50;
      margin-top: 15px;
      margin-bottom: 5px;
  }
  
  
  
  
  
  
  
  
  /* Hide scrollbar by default in WebKit browsers */
  .contentContainer::-webkit-scrollbar {
      width: 8px; /* Width of the scrollbar */
      opacity: 0; /* Make scrollbar transparent by default */
      transition: opacity 0.3s ease;
  }
  
  .contentContainer::-webkit-scrollbar-track {
      background: white; /* Track color (primary blue) */
      border-radius: 4px;
  }
  
  .contentContainer::-webkit-scrollbar-thumb {
      background-color: #252758; /* Thumb color (hover blue) */
      border-radius: 4px;
      box-shadow: inset 0 0 10px rgba(63, 120, 160, 0.5); /* Subtle inner shadow */
      transition: background-color 0.3s ease, box-shadow 0.3s ease;
  }
  
  .contentContainer::-webkit-scrollbar-thumb:hover {
      background-color: #4E92B5; /* Lighter blue on hover */
      box-shadow: inset 0 0 12px rgba(63, 120, 160, 0.8); /* Enhance shadow on hover */
  }
  
  /* Show scrollbar only on hover */
  .contentContainer:hover::-webkit-scrollbar {
      opacity: 1; /* Make the scrollbar visible */
  }
  
  
  
  
  
  
  
  
  
  
  /* Footer Styles */
  footer {
      position: relative; /* Changed from static */
      width: 100%;
      text-align: center;
      background: var(--primary-color);
      color: white;
      font-family: 'Roboto', sans-serif;
      padding: 20px 40px; /* Adjusted padding */
      height: 100px; /* Changed from fixed height */
      min-height: 100px; /* Minimum height instead of fixed */
      margin-top: 60px; /* Space from content */
      clear: both; /* Ensures footer clears floating elements */
      z-index: 10; /* Ensure footer stays above other elements */
  }
  
  /* Footer Links */
  footer a {
      color: white;
    
      text-decoration: underline;
      transition: opacity 0.3s ease;
  }
  
  footer a:hover {
      opacity: 0.8;
  }
  
  
  
  
  
  
  
  
  /* Button States */
  button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transition: opacity 0.3s ease;
  }
  
  /* Notifications */
  .routing-notification {
      position: fixed;
      top: 20px;
      right: 20px;
      background: white;
      border-radius: 8px;
      padding: 15px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      z-index: 9999;
      max-width: 300px;
      animation: slideIn 0.3s ease-out;
  }
  
  @keyframes slideIn {
      from {
          transform: translateX(100%);
          opacity: 0;
      }
      to {
          transform: translateX(0);
          opacity: 1;
      }
  }
  
  
  /*
  
  /* Hover effect *
  .workspace-message-bubble:hover {
      border-color: #5E92B5;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  
  /* When message contains plotly *
  .workspace-message-bubble .plotly-container {
      margin: 10px 0;
      border-radius: 4px;
      overflow: hidden;
  }
  
  /* When message contains mermaid *
  .workspace-message-bubble .mermaid {
      margin: 10px 0;
      padding: 10px;
      background: white;
      border-radius: 4px;
  }
  
  
  /* Message Bubble Styles *
  .workspace-message-bubble {
      margin: 20px;
      padding: 20px;
      border: 1px solid #3F78A0;
      border-radius: 8px;
      background: white;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      width: calc(100% - 40px); /* Full width minus margins *
      max-width: 100%;
      box-sizing: border-box;
      animation: fadeIn 0.3s ease-out;
  }
  
  */
  
  .message-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      padding-bottom: 10px;
      border-bottom: 1px solid #eee;
  }
  
  
  .message-type {
      color: #3F78A0;
      font-weight: 500;
      font-size: 0.9em;
  }
  
  
  
  /* Animation */
  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  
  
  
  .close-error-button {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      padding: 5px;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: background-color 0.3s ease;
  }
  
  
  
  /* Error message hover effect */
  .error-message.detailed:hover {
      box-shadow: 0 4px 12px rgba(255, 68, 68, 0.15);
  }
  
  /* Improve button accessibility */
  .retry-button:focus,
  .details-button:focus,
  .close-error-button:focus {
      outline: 2px solid #2E5D79;
      outline-offset: 2px;
  }
  
  
  
  @keyframes slideDown {
      from {
          opacity: 0;
          transform: translateY(-10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  
  
  
  
  


/* ======= SELECTION REVIEW PANEL STYLES ======= */

/* Panel Container */
.selection-review-workspace {
    background-color: var(--bg-color-inside);
    border-radius: 8px;
    margin-bottom: 50px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.35), 0 0 10px rgba(0, 0, 0, 0.23);
  }
  
  .selection-contents-container {
    flex-grow: 1;
    width: calc(100% - 40px);
    min-height: 300px;
    max-height: calc(100vh - 350px);
    margin: 10px;
    margin-bottom: 0;
    padding: 10px;
    background-color: white;
    border: 0px solid #252758;
    border-radius: 0px;
    overflow-y: auto;
    color: #333;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    transition: height 0.3s ease-out;
  }
  
  .selection-metadata-summary {
    margin-left: 20px;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
  }
  
  /* ======= SELECTION ITEMS ======= */
  
  /* Consistent naming using .selection-item as the standard */
  .selection-item,
  .selected-content-container {
    position: relative;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .selection-item:hover,
  .selected-content-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #252758);
  }
  
  .selection-item.selected,
  .selected-content-container.selected {
    border: 1px solid var(--primary-color, #252758);
    background-color: rgba(37, 39, 88, 0.05);
  }
  
  .selection-content {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px;
    margin: 10px 0;
    min-height: 50px;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .selection-type {
    display: inline-block;
    font-size: 12px;
    padding: 3px 8px;
    background-color: var(--primary-color, #252758);
    color: white;
    border-radius: 3px;
    margin-bottom: 8px;
  }
  
  /* Selection highlight */
  ::selection {
    background-color: rgba(62, 93, 121, 0.2);
    color: inherit;
  }
  
  /* ======= EDIT CONTROLS ======= */
  
  /* Edit/Delete controls within items */
  .edit-delete-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .selection-item:hover .edit-delete-controls,
  .selected-content-container:hover .edit-delete-controls {
    opacity: 1;
  }
  
  /* Edit Mode */
  .selection-item.editing .selection-content,
  .selected-content-container.editing .selection-content {
    display: none;
  }
  
  .selection-editor,
  .markdown-editor,
  .plotly-editor,
  .mermaid-editor {
    width: 100%;
    min-height: 200px;
    border: 1px solid var(--primary-color, #252758);
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
    font-family: monospace;
    line-height: 1.5;
  }
  
  .markdown-input, 
  .plotly-json-input, 
  .mermaid-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: both;
    min-height: 200px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #ddd;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
  }
  
  .markdown-preview, 
  .mermaid-preview {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 200px;
    background-color: #f8f9fa;
  }
  
  .editor-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
  }
  
  /* ======= BUTTON STYLES ======= */
  
  /* Review trigger button */
  .selection-review-btn,
  .select-for-review-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color, #252758);
    color: white;
    border: none;
    border-radius: 4px;
    height: 36px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    font-size: 14px;

  }
  
  .selection-review-btn:hover,
  .select-for-review-btn:hover,
  .send-to-selection-review-btn:hover {
    background-color: var(--secondary-color, #3e5d79);
    box-shadow: 0 0 10px rgba(63, 120, 160, 0.5);
/*    transform: scale(1.05);  */
  }
  
  /* Standardized button class */
  .selection-review-workspace .btn {
    padding: 8px 12px;
    margin: 0 3px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    white-space: nowrap;
    cursor: pointer;
    background-color: var(--button-color, #252758);
    color: var(--button-text-color, white);
  }
  
  /* ======= ADDITIONAL CONTEXT AREA ======= */
  
  .additional-context-container {
    padding: 20px;
    padding-top: 20px;
    padding-bottom: 0px;
    margin-top: 10px;
    margin-bottom: 0px;
    border-top: 0px solid var(--border-color, #ddd);
  }
  
  .additional-context-input {
    width: 100%;
    min-height: 200px;
    max-height: 500px;
    padding: 12px;
    border: 1px solid #252758;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    overflow-y: auto;
    font-family: "Roboto", sans-serif;
    transition: all 0.2s ease;
  }
  
  .additional-context-input:focus {
    outline: none;
    border: 2px solid #fda400;
    box-shadow: 0 0 5px rgba(37, 39, 88, 0.2);
  }
  
  /* ======= EDITOR INTERFACE ======= */
  
  .editor-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 15px;
  }
  
  .editor-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
  }
  
  .editor-tab.active-tab {
    border-bottom: 2px solid var(--primary-color, #252758);
    color: var(--primary-color, #252758);
  }
  
  /* Validation status indicators */
  .json-validation-status,
  .mermaid-validation-status {
    margin-top: 10px;
    font-size: 14px;
    padding: 5px;
    border-radius: 4px;
  }






















  
  
  
  
  
  
  
  
  
  
  
  
  
  .initialization-error {
      position: fixed;
      top: 0;
      right: 0;
      z-index: 9999;
      pointer-events: none; /* Allow clicking through the overlay */
  }
  
  .initialization-error .error-content {
      background: white;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      max-width: 400px;
      pointer-events: auto; /* Re-enable clicking for the error box */
      transition: transform 0.3s ease-out;
  }
  
  .initialization-error .error-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
  }
  
  .initialization-error h3 {
      margin: 0;
      color: #dc3545;
  }
  
  .initialization-error .close-error {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      padding: 0 5px;
      color: #666;
  }
  
  .initialization-error .error-actions {
      display: flex;
      gap: 10px;
      margin: 15px 0;
  }
  
  .initialization-error button {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.2s;
  }
  
  .initialization-error .retry-btn {
      background: #3E5D79;
      color: white;
  }
  
  .initialization-error .ignore-btn {
      background: #6c757d;
      color: white;
  }
  
  .initialization-error pre {
      background: #f5f5f5;
      padding: 10px;
      border-radius: 4px;
      overflow-x: auto;
      font-size: 12px;
  }
  
  .initialization-error.fade-out {
      opacity: 0;
      transition: opacity 0.3s ease-out;
  }
  
  .init-notification {
      position: fixed;
      top: 20px;
      right: 20px;
      background: white;
      padding: 10px 20px;
      border-radius: 4px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      z-index: 9999;
      transition: opacity 0.3s ease-out;
  }
  
  .init-notification.success {
      background: #d4edda;
      color: #155724;
  }
  
  .init-notification.error {
      background: #f8d7da;
      color: #721c24;
  }
  
  .init-notification.fade-out {
      opacity: 0;
  }
  
  @keyframes slideIn {
      from {
          transform: translateX(100%);
          opacity: 0;
      }
      to {
          transform: translateX(0);
          opacity: 1;
      }
  }
  
  
  
  
  
  
  
  
  .error-message {
      background-color: #fee2e2;
      border: 1px solid #ef4444;
      color: #991b1b;
      padding: 12px;
      margin: 8px 0;
      border-radius: 6px;
  }
  
  
  
  
  
  
  
  /* Add to your existing CSS */
  
  
  .initialization-error h3 {
      color: #ff4444;
      margin: 0 0 10px 0;
  }
  
  .initialization-error button {
      background: #ff4444;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
      margin-top: 10px;
  }
  
  
  
  
              .chat-error {
                  padding: 20px;
                  background: #fff3f3;
                  border: 1px solid #ff4444;
                  border-radius: 8px;
                  margin: 20px;
              }
  
              .chat-error h3 {
                  color: #ff4444;
                  margin: 0 0 10px 0;
              }
  
              .chat-error button {
                  background: #ff4444;
                  color: white;
                  border: none;
                  padding: 8px 16px;
                  border-radius: 4px;
                  cursor: pointer;
                  margin-top: 10px;
              }
  
              .chat-error button:hover {
                  background: #ff6666;
              }
  
  
  
  
  
  
  
  @keyframes expandInput {
      from {
          transform: scale(0.5);
          opacity: 0;
      }
      to {
          transform: scale(1);
          opacity: 1;
      }
  }
  
  
  @keyframes fadeInOut {
      0%, 100% { opacity: 0.5; }
      50% { opacity: 1; }
  }
  
  
  
  
  
  
  
  
          .message.preview {
              max-height: 150px;
              overflow: hidden;
              position: relative;
          }
  
          .message.preview::after {
              content: '';
              position: absolute;
              bottom: 0;
              left: 0;
              right: 0;
              height: 50px;
              background: linear-gradient(transparent, var(--chat-bg));
              pointer-events: none;
          }
  
  
  
  
  
  .chat-section {
      display: flex;
      flex-direction: column;
      
      /* Sizing */
      flex: 1;  /* Allows it to grow and fill available space */
      min-width: 700px;  /* Minimum width */
      width: 100%;  /* Full width */
      height: auto;  /* Dynamic height */
      max-height: 100vh;  /* Maximum height of viewport */
  
  
      position: relative;  /* For internal positioning context */
      
      /* Visual Styling */
      background: var(--bg-color-inside);
      border: 1px solid var(--border-color);
      border-radius: var(--border-radius);
      
      /* Overflow Handling */
      overflow: hidden;  /* Prevents content from spilling out */
      
      /* Transitions */
      transition: var(--transition);
      
      /* Scrolling (if needed) */
      overflow-y: auto;  /* Allows scrolling if content exceeds height */
  }
  
  
  
  
  .chat-input-area {
      flex-shrink: 0;  /* Prevents input from shrinking */
      width: 100%;  /* Full width */
  }
  
  
  /* Chat Container */
  .chat-container {
      display: flex;
      flex: 1;
      flex-direction: column;
      position: relative;
      gap: 10px;
      overflow: hidden;
      width: 100%;
      box-sizing: border-box;
  }
  
  /* Chat Messages Container */
  .chat-messages {
      position: relative;
      flex: 1; /* Ensure the container grows with the parent */
      min-height: 300px; /* Set a reasonable minimum height */
      max-height: none; 
      overflow-y: auto; /* Allow vertical scrolling */
      overflow-x: hidden; /* Prevent horizontal scrolling */
      padding: 15px 20px; /* Consistent padding for content */
      display: flex;
      flex-direction: column; /* Stack messages vertically */
      gap: 10px; /* Spacing between messages */
      scroll-behavior: smooth; /* Smooth scrolling for a better UX */
      background-color: #ffffff; /* Keep the background clean */
      border: none; /* Remove unnecessary borders */
      border-radius: 0; /* No rounded corners */
      box-sizing: border-box; /* Include padding and border in dimensions */
      transition: height 0.3s ease-in-out; /* Smooth transition for height changes */
  }
  
  /* Adjustments for specific behavior */
  .chat-messages {
      height: 100%; /* Take up the parent's height */
      margin: 0 -10px; /* Consistent negative margins */
  }
  
  /* Enforce a minimum height */
  .chat-messages {
      min-height: 400px; /* Enforce a larger minimum height */
  }
  
  
  /* Hide scrollbar by default in WebKit browsers */
  .chat-messages::-webkit-scrollbar {
      width: 8px; /* Width of the scrollbar */
      opacity: 0; /* Make scrollbar transparent by default */
      transition: opacity 0.3s ease-in-out; /* Smooth transition for visibility */
  }
  
  .chat-messages::-webkit-scrollbar-track {
      background: #f5f5f5; /* Subtle background for the track */
      border-radius: 4px; /* Rounded corners for the track */
  }
  
  .chat-messages::-webkit-scrollbar-thumb {
      background-color: #252758; /* Thumb color */
      border-radius: 4px; /* Rounded corners for the thumb */
      box-shadow: inset 0 0 10px rgba(37, 39, 88, 0.5); /* Subtle inner shadow */
      transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth hover transitions */
  }
  
  .chat-messages::-webkit-scrollbar-thumb:hover {
      background-color: #4E92B5; /* Lighter blue on hover */
      box-shadow: inset 0 0 12px rgba(63, 120, 160, 0.8); /* Enhanced shadow on hover */
  }
  
  .chat-messages:hover::-webkit-scrollbar {
      opacity: 1; /* Show the scrollbar on hover */
  }
  
  
  
  .workspace-text {
      background-color: #90caf9 !important; /* Blue for workspace text */
      border: 2px solid #42a5f5;
      padding: 15px;
      margin: 10px 0;
      border-radius: 4px;
      position: relative;
  }
  
  .workspace-text::before {
      content: 'WORKSPACE TEXT';
      position: absolute;
      top: -10px;
      left: 10px;
      background: #42a5f5;
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 10px;
      color: white;
  }
  
  .plotly-chart {
      background-color: #a5d6a7 !important; /* Green for Plotly */
      border: 2px solid #66bb6a;
      padding: 20px;
      margin: 15px 0;
      border-radius: 4px;
      position: relative;
      min-height: 100px;
  }
  
  .plotly-chart::before {
      content: 'PLOTLY CHART';
      position: absolute;
      top: -10px;
      left: 10px;
      background: #66bb6a;
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 10px;
      color: white;
  }
  
  /*
  
  .mermaid-container {
      background-color: #ffffff !important; /* Purple for Mermaid *
      border: 2px solid #ab47bc;
      padding: 20px;
      margin: 15px 0;
      border-radius: 4px;
      position: relative;
      min-height: 100px;
  }
  
  .mermaid-container::before {
      content: 'MERMAID DIAGRAM';
      position: absolute;
      top: -10px;
      left: 10px;
      background: #ab47bc;
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 10px;
      color: white;
  }
  
  /* Error states *
  .error {
      background-color: #ffcdd2;
      border: 2px solid #ef5350;
      padding: 10px;
      margin: 5px 0;
      border-radius: 4px;
      color: #c62828;
  }
  
  
  */
  
  
  
  /* Add a subtle arrow to the dropdown /
  .menu-dropdown::before {
      content: '';
      position: absolute;
      top: -6px;
      right: 10px;
      width: 12px;
      height: 12px;
      background: var(--background-color, white);
      border-left: 1px solid var(--border-color, rgba(0,0,0,0.1));
      border-top: 1px solid var(--border-color, rgba(0,0,0,0.1));
      transform: rotate(45deg);
  }
  
  
  
  
  
  
  /* Menu Dropdown /
  .menu-dropdown {
      position: absolute;
      top: 100%;
      right: 0;
      width: 280px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      z-index: 100;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: all 0.2s;
  }
  
  .menu-dropdown.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  
  */
  
  
  
  
  
  
  /*
  
  
  /*
  
  .chat-input.expanded {
      min-height: 500px;
      overflow-y: auto; /* Show scrollbar when expanded *
  }
  
  .chat-input:focus {
      outline: none;
      border-color: #2563eb;
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }
  
  .chat-input:hover {
      outline: none;
      border-color: #2563eb;
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }
  
  
  */
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .input-controls {
      display: flex;
      justify-content: space-between; /* Distributes the two groups to the sides */
      align-items: center;
      background: var(--bg-colour); /* Background color for the container */
      font-size: 14px;
      margin-top: 5px;
      margin-bottom: 10px;
    /*  gap: 10px; /* Space between elements */
      padding: 0 15px; /* Adds 20px padding to ensure both groups are 20px off their respective side */
  }
  
  .input-controls-left {
      display: flex;
      align-items: center;
      gap: 10px; /* Spacing between buttons in the left group */
  }
  
  .input-controls-right {
      display: flex;
      align-items: center;
      gap: 10px; /* Spacing between buttons in the right group */
  }
  
  
  .input-controls button {
      border: none;
      padding: 0px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform 0.2s ease;
      background: var(--button-color);
      color: var(--button-text-color);
      cursor: pointer;
      box-shadow: 0 0 10px rgba(63, 120, 160, 0.5);
  
  }
  
  
  
  /* Default size */
  .chat-input-area {
      height: 500px;
      transition: height 0.3s ease;
  }
  
  /* Resizing classes specific to the input area */
  .chat-input-area.input-large {
      height: 300px;
  }
  
  .chat-input-area.input-small {
      height: 100px;
  }
  
  
  
  
  /* Chat Input Area - area outside the textarea */
  .chat-input-area {
      padding-left: 0px;
      padding-right: 0px;
      padding-top: 10px;
      height: 100%;
      margin-top: 10px;
      margin-bottom: 10px;
      max-height: 700px;
      border-top: 1px solid var(--border-color);   /* e5e7eb;  */
  }
  
  .expandable-input-area {
      position: relative;
  }
  
  
  .chat-input {
      min-width: 625px;
      align-items: left;
      min-height: 150px;
      max-height: none;
      max-width: 625px; 
      margin-left: 15px;
      padding: 10px;
      border: 1px solid #252758;
      border-radius: 8px;
      font-size: 14px;
      line-height: 1.5;
      transition: all 0.2s;
      font-family: "Roboto", sans-serif;
    overflow-x: hidden;
  }
  
  
  
  .chat-input textarea {
    overflow-x: hidden;
  
  }
  
  .chat-input-container {
      position: relative;
      display: flex;
      gap: 10px;
      min-height: 200px;
      padding: 10px;
      border-top: 1px solid #252758;
      font-family: "Roboto", sans-serif;
      font-size: 14px;
      line-height: 1.6;
  }
  
  /*
  
  .expandable-input-area {
      position: relative;
      font-family: "Roboto", sans-serif;
      transition: all 0.3s ease;
      transform-origin: bottom right; /* Set transform origin to bottom right *
  }
  
  
  
  /* State 1: Default *
  .expandable-input-area textarea {
      height: 150px;
      width: calc(100% - 40px); /* Space for controls *
      resize: none;
        transition: all 0.3s ease;
  }
  
  /* State 2: Expanded *
  .expandable-input-area.expanded textarea {
      height: 400px;
  }
  
  
  /* State 3: Fullscreen *
  .expandable-input-area.fullscreen {
      position: fixed;
      bottom: 50px;
      left: 400px;
      width: 80%; /* Make it responsive *
      max-width: 1000px; /* Add maximum width *
      height: 40vh;
      background: white;
      box-shadow: 0 0 20px rgba(0,0,0,0.2);
      border-radius: 8px;
      z-index: 1000;
      padding: 0;
      display: flex;
  }
  
  /* Textarea in fullscreen mode *
  .expandable-input-area.fullscreen textarea {
      width: calc(100% - 20px); /* Full width minus margins *
      height: calc(100% - 20px); /* Full height minus margins *
      margin: 10px;
      padding: 20px;
      font-size: 16px;
      border: none;
      border-radius: 8px;
      resize: none;
      box-sizing: border-box;
      overflow-x: hidden;
  }
  
  /* Optional: Add focus state *
  .expandable-input-area.fullscreen textarea:focus {
      outline: none;
      box-shadow: inset 0 0 0 2px var(--primary-color);
  }
  
  @keyframes expandFromBottomRight {
      from {
          transform: scale(0.3);
          opacity: 0;
      }
      to {
          transform: scale(1);
          opacity: 1;
      }
  }
  
  /* Add transition for collapsing *
  .expandable-input-area.collapsing {
      animation: collapseToBottomRight 0.3s ease forwards;
  }
  
  @keyframes collapseToBottomRight {
      from {
          transform: scale(1);
          opacity: 1;
      }
      to {
          transform: scale(0.3);
          opacity: 0;
      }
  }
  
  */
  
  
  /* Chat Header */
  .chat-header {
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .chat-avatar {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 0%;
    border: 0px solid rgba(255, 255, 255, 0.2);
  }
  
  .chat-title {
    font-weight: 500;
    font-size: 24px;
      color: white;
  }
  
  /* Chat Controls Top Bar of the chat */
  .chat-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    
    
  }
  
  
  
  
  .header-text {
      display: flex;
      flex-direction: column;
  }
  
  
  .chat-subtitle {
      font-size: 14px;
      color: white;
  }
  
  .header-right {
      position: relative;
  }
  
  
  
  .workspace-selector {
      padding: 6px 12px;
      border: 1px solid #e5e7eb;
      border-radius: 6px;
      font-size: 14px;
      color: #374151;
      background: white;
      cursor: pointer;
  }
  
  /* Size Controls Container */
  .size-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      height: 30px;
      padding: 8px 15px;
      background: rgba(255, 255, 255, 0.8); /* Slightly transparent background */
      border-bottom: 0px solid rgba(62, 93, 121, 0.1); /* Subtle bottom border */
      z-index: 2; /* Ensures it stays on top */
  }
  
  /* Size Control Buttons */
  /* General styles for size control buttons */
  .size-control-btn {
    background-color: var(--button-color); /* Navy blue background */
    color: white; /* Text color */
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    width: 30px;
    height: 30px;
     line-height: 1; /* Ensure consistent alignment */
    font-size: 20px; /* Initial size of + and - */
    /* font-weight: bold;  Bold text for better visibility */
    cursor: pointer;
      transition: var(--button-hover-settings);
  }
  
  /* Increase the size of + and - on hover */
  .size-control-btn:hover {
    background-color: var(--button-hover-color); /* Lighter blue on hover */
    transform: scale(1.1);/* Symmetrical scaling */
    color: white; /* Ensure color stays white */
    border: 2px solid dodgerblue;
  }
  
  /* Active (pressed) state for buttons */
  .size-control-btn:active {
    background-color: dodgerblue; /* Retain blue when pressed */
    transform: scale(1.1); /* Slightly smaller than hover for pressed effect */
  }
  
  
  
  .size-display {
      min-width: 40px; /* Ensures consistent width */
      text-align: center; /* Centers the text */
      font-size: 14px; /* Font size */
      color: #666; /* Neutral text color */
      background-color: white; /* Contrasting background */
      padding: 2px 4px; /* Optional padding for better spacing */
      margin: 0 5px;
      border-radius: 4px; /* Slight rounding for a cleaner look */
  }
  
  
  
  
  
  
  
  .menu-container {
      position: relative;
      z-index: 150;
  }
  
  .menu-button {
    background-color: var(--button-color); 
    color: var(--button-text-color);
    border: 1px solid --var(primary-color);
    border-radius: 50%;  
    padding: 5px;
    display: flex;
    height: 40px;
    width: 40px;
    font-size: 15pt;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--button-hover-settings);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
  }
  
  .menu-button.active {
      background-color: #f0f0f0;
  }
  
  .menu-button:hover {
      transform: scale(1.1);
      background-color: var(--button-hover-color);
       border-color: 1px solid dodgerblue;
  }
  
  .menu-dropdown {
        display: none;
      position: absolute;
      top: calc(100% + 5px);
      right: 0;
      background: white;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      box-shadow: 
          0 10px 20px rgba(0, 0, 0, 0.15),
          0 6px 10px rgba(0, 0, 0, 0.1);
      z-index: 100;
      width: 300px;
      padding: 12px;
      max-height: 700px;
      overflow-y: auto;
      color: var(--text-color);
      animation: menuDropdownAppear 0.3s ease;
  }
  
  @keyframes menuDropdownAppear {
      from {
          opacity: 0;
          transform: translateY(-10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  .menu-content {
      display: flex;
      flex-direction: column;
      gap: 8px;
  }
  
  .new-conversation-btn,
  .menu-item,
  .theme-toggle {
      display: flex;
      align-items: center;
      gap: 12px;
      background: none;
      border: 1px solid transparent;
      padding: 8px 5px;
      text-align: left;
      cursor: pointer;
      border-radius: 8px;
      transition: 
          background-color 0.3s ease,
          color 0.3s ease,
          transform 0.3s ease;
      font-size: 14px;
      color: #333;
  }
  
  .new-conversation-btn:hover,
  .menu-item:hover,
  .theme-toggle:hover {
      background-color: #f0f0f0;
      transform: translateX(5px);
        border: 1px solid dodgerblue;
  }
  
  .menu-item svg,
  .new-conversation-btn svg,
  .theme-toggle svg {
      margin-right: 10px;
      transition: color 0.3s ease;
  }
  
  .mode-selector-container {
      margin: 10px 0;
  }
  
  .mode-selector {
      width: 100%;
      padding: 10px;
      border: 1px solid var(--primary-color);
      border-radius: 8px;
      background-color: white;
      transition: 
          border-color 0.3s ease,
          box-shadow 0.3s ease;
  }
  
  .mode-selector:hover,
  .mode-selector:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 2px rgba(37, 39, 88, 0.2);
  }
  
  .conversation-history-panel {
      border-top: 1px solid #e0e0e0;
      padding-top: 10px;
      margin-top: 10px;
  }
  
  .history-toggle-btn {
      width: 100%;
      padding: 10px;
      text-align: left;
      background: none;
      border: none;
      cursor: pointer;
      border-radius: 8px;
      transition: 
          background-color 0.3s ease,
          transform 0.3s ease;
  }
  
  .history-toggle-btn:hover {
      background-color: #f0f0f0;
      transform: translateX(5px);
  }
  
  /* Scrollbar styling */
  .menu-dropdown::-webkit-scrollbar {
      width: 6px;
  }
  
  .menu-dropdown::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 10px;
  }
  
  .menu-dropdown::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 10px;
  }
  
  .menu-dropdown::-webkit-scrollbar-thumb:hover {
      background: #555;
  }
  
  
  
  
  
  .workspace-change-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1500;
  }
  
  .workspace-change-modal .modal-content {
      background: white;
      padding: 20px;
      border-radius: 10px;
      text-align: center;
      max-width: 400px;
  }
  
  .workspace-change-modal .modal-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
  }
  
  .workspace-change-modal button {
      padding: 10px 20px;
      border: none;
      border-radius: 5px;
      cursor: pointer;
  }
  
  .workspace-change-modal .confirm-btn {
      background-color: #4CAF50;
      color: white;
  }
  
  .workspace-change-modal .cancel-btn {
      background-color: #f44336;
      color: white;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  .thread-name-modal .modal-content {
      background-color: #f9f9f9;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .thread-name-modal input {
      width: 100%;
      padding: 10px;
      margin: 10px 0;
      border: 1px solid #ddd;
      border-radius: 4px;
  }
  
  .thread-name-modal .modal-actions {
      display: flex;
      justify-content: space-between;
  }
  
  .thread-name-modal .confirm-btn,
  .thread-name-modal .cancel-btn {
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.3s ease;
  }
  
  .thread-name-modal .confirm-btn {
      background-color: #4CAF50;
      color: white;
  }
  
  .thread-name-modal .cancel-btn {
      background-color: #f44336;
      color: white;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  /*
  
  .nav-bottom-button {
    background: #5d9aa0;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(63, 120, 160, 0.5);
     width: 30px; /* Button width /
    height: 30px; /* Button height /
  } 
  
  .nav-bottom-button:hover {
    background: #5d9aa0;
    box-shadow: 0 0 10px rgba(63, 120, 160, 0.5);
  transform: scale(1.1); /* Slight zoom on hover /
  }
  
  .nav-top-button {
      border-radius: 50%;
      border: none;
      width: 30px; /* Button width /
      height: 30px; /* Button height /
      stroke: #ffffff; 
      color: white;
      
  }    
    
    
    */
   
  
  
  
  
  .bulk-action-btn:hover {
      background-color: #f0f0f0;
      transform: translateX(5px);
    translate: transform 0.3s ease;
  }
  
  
  
  .bulk-actions-menu.visible {
      display: block;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  
  
  
  .bulk-actions-menu {
      position: absolute;
      top: 100%;
      right: 0;
      background: white;
      border: 1px solid var(--border-color, #ddd);
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      z-index: 100;
      min-width: 220px;
      padding: 10px;
      margin-top: 10px;
      display: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: 
          opacity 0.3s ease,
          visibility 0.3s ease,
          transform 0.3s ease;
  }
  
  .bulk-action-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      background: none;
      border: none;
      padding: 10px 12px;
      text-align: left;
      cursor: pointer;
      border-radius: 8px;
      transition: 
          background-color 0.3s ease,
          color 0.3s ease,
          transform 0.3s ease;
      font-size: 14px;
      color: #333;
  }
  
  
  
  .bulk-action-btn.select-all-btn i {
      color: #4CAF50; /* Green for select */
  }
  
  .bulk-action-btn.deselect-all-btn i {
      color: #9E9E9E; /* Gray for deselect */
  }
  
  .bulk-action-btn.delete-selected-btn i {
      color: #F44336; /* Red for delete */
  }
  
  .bulk-action-btn.copy-selected-btn i {
      color: #2196F3; /* Blue for copy */
  }
  
  .bulk-action-btn.expand-all-btn i {
      color: #FF9800; /* Orange for expand */
  }
  
  .bulk-action-btn.collapse-all-btn i {
      color: #9C27B0; /* Purple for collapse */
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
      .bulk-actions-menu {
          min-width: 180px;
          right: -50px; /* Adjust for smaller screens */
      }
  }
  
  
  
  /* Scrollbar styling for the menu */
  .bulk-actions-menu::-webkit-scrollbar {
      width: 6px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 10px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 10px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-thumb:hover {
      background: #555;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  /* Instant Actions Dropdown Container */
  .instantActionsDropdown {
      position: relative;
      z-index: 100;  
      display: inline-block;
  }
  

  
  /*
  .instantActionsButton:hover {
      background-color: var(--button-color-hover);
      transform: translateX(5px);
    translate: transform 0.3s ease;
  }
  */ 

  
   
  /* Instant Actions Menu */
  .instantActionsMenu {
      display: none;
      position: absolute;
      top: 30px;
      right: 20px;
      width: 150px;
      max-width: 300px;
      height: 300px;
      background-color: white;
      border: 1px solid var(--color-border);
      border-radius: 8px;
      box-shadow: var(--shadow-dropdown);
      z-index: 100;
      margin-top: var(--spacing-small);
      overflow: hidden;
      opacity: 0;
      transform: translateY(-10px);
      transition: 
          opacity 0.3s ease, 
          transform 0.3s ease;
  }
  
  .instantActionsMenu.visible {
      display: block;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  
  /* Instant Actions Content */
  .instantActionsContent {
      display: flex;
      flex-direction: column;
      max-height: 400px;
      visibility: visible;
      height: 200px;
      width: 150px;
  }
  

  

  /* Scrollbar Styling for Actions Content */
  .instantActionsContent::-webkit-scrollbar {
      width: 6px;
  }
  
  .instantActionsContent::-webkit-scrollbar-track {
      background: var(--color-background);
  }
  
  .instantActionsContent::-webkit-scrollbar-thumb {
      background-color: var(--color-primary);
      border-radius: 3px;
  }
  
  /* Notification Styles */
  .notification {
      position: fixed;
      top: 20px;
      right: 20px;
      padding: var(--spacing-medium);
      border-radius: 8px;
      color: white;
      z-index: 10000;
      font-family: var(--font-primary);
      box-shadow: var(--shadow-subtle);
      opacity: 0;
      transform: translateX(20px);
      transition: 
          opacity 0.3s ease,
          transform 0.3s ease;
  }
  
  .notification.info-notification { 
      background-color: var(--color-primary); 
  }
  
  .notification.success-notification { 
      background-color: var(--color-secondary); 
  }
  
  .notification.warning-notification { 
      background-color: #f39c12; 
  }
  
  .notification.error-notification { 
      background-color: #e74c3c; 
  }
  
  .notification.show {
      opacity: 1;
      transform: translateX(0);
  }
  
  
  
  
  
  
  
  /*
  
  
  .instantActionsDropdownContainer {
      position: relative;
      z-index: 9999;
      display: inline-block;
  }
  
  .instantActionsButton {
      transition: all 0.3s ease;
  }
  
  
  
  .instantActionsMenu {
      position: absolute;
      top: 100%;
      right: 0;
      background: white;
      border: 1px solid var(--border-color, #ddd);
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      z-index: 10001;
      min-width: 220px;
      padding: 10px;
      margin-top: 10px;
      display: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: 
          opacity 0.3s ease,
          visibility 0.3s ease,
          transform 0.3s ease;
  }
  
  .instantActionsMenu.visible {
      display: block;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  
  
  .instantActionButton {
      display: flex;
      align-items: center;
      gap: 12px;
      background-color: var(--button-color); 
      color: var(--button-text-color);
      border: none;
      padding: 10px 12px;
      text-align: left;
      cursor: pointer;
      border-radius: 8px;
      transition: 
          background-color 0.3s ease,
          color 0.3s ease,
          transform 0.3s ease;
      font-size: 14px;
      height: 30px;
      width: 50px;
      margin-left: 10px;
  }
  
  .instantActionsContent {
     position: absolute;
      top: 100%;
      right: 0;
      background: white;
      border: 1px solid var(--border-color, #ddd);
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      z-index: 10001;
      min-width: 220px;
      padding: 10px;
      margin-top: 10px;
      display: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: 
          opacity 0.3s ease,
          visibility 0.3s ease,
          transform 0.3s ease;
  }
  
  .instantActionsButton:hover {
      background-color: var(--hover-background);
  }
  
  
  */
  
  
  .notification {
      position: fixed;
      top: 20px;
      right: 20px;
      padding: 10px 15px;
      border-radius: 4px;
      color: white;
      z-index: 1000;
  }
  
  .success-notification {
      background-color: #4CAF50;
  }
  
  .warning-notification {
      background-color: #FF9800;
  }
  
  .error-notification {
      background-color: #F44336;
  }
  
  
  

  
  /* Chat Footer */
  .chat-footer {
      text-align: center;
      margin: -15px;
       border-top: 0px solid #e5e7eb;
       transform: translateY(-100%); /* Correct centering offset */
  }
  
  .sponsor-link {
      font-size: 14px;
      color: #252758;
      text-decoration: none;
  
  }
  
  .sponsor-link:hover {
      color: #2563eb;
  }
  
  /* Animations */
  @keyframes messageSlideIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  /* Top row button panel */
  .chat-options-panel {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 16px;
      margin-bottom: 10px;
      background: var(--bg-color-inner);
      border-bottom: 1px solid #252758;
      border-radius: 0px;
  }
  
  
  
  
  .size-controls,
  .text-size-controls,
  .view-mode-controls {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 2px;
      margin-right: 3px;
  
  }
  
  
  .text-size,
  .view-mode {
      padding: 4px 8px;
      background: white;
  
      border-radius: 4px;
      font-size: 15px;
      color: #3e5d79;
      cursor: pointer;
        border: 2px solid var(--primary-color);
        margin-right: 3px;
          min-width: 30px; /* Button width */
      height: 30px; /* Button height */
      box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    transition: var(--button-hover-settings);
  }
  
  
  .text-size:hover,
  .view-mode:hover {
    transform: scale(1.1);
    background-color: var(--button-hover-color);
    border: 2px solid dodgerblue;
    color: white;
    
  }
  
  .text-size.active,
  .view-mode.active {
      background: #252758;
      color: #ffffff;
      border-color: #2563eb;
  }
  
  /* Welcome Message */
  .welcome-message {
      padding: 20px;
      background: #f9fafb;
      border-radius: 12px;
      text-align: center;
      margin-bottom: 24px;
  }
  
  .welcome-message h2 {
      margin: 0 0 12px;
      font-size: 20px;
      color: #111827;
  }
  
  .welcome-message p {
      margin: 0 0 16px;
      color: #6b7280;
  }
  
  .quick-actions {
      display: flex;
      justify-content: center;
      gap: 12px;
  }
  
  .quick-action-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 6px;
      font-size: 14px;
      color: #374151;
      cursor: pointer;
      transition: all 0.2s;
  }
  
  .quick-action-btn:hover {
      background-color: var(--primary-color);
      color: #2563eb;
      border: 1px solid dodgerblue;
  }
  
  /* Dark Mode */
  [data-theme="dark"] {
      /* Add dark mode styles here */
      background: #1f2937;
      color: #f9fafb;
  }
  
  /* Responsive Design */
  @media (max-width: 640px) {
      .chat-header {
          padding: 12px;
      }
  
      .menu-dropdown {
          width: 100%;
          max-width: 280px;
      }
  
      .quick-actions {
          flex-direction: column;
      }
  
      .chat-input {
          font-size: 16px; /* Better for mobile typing */
      }
  }
  
  
  
  
  
  .thread-history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .thread-history-item:hover {
    background-color: rgba(0,0,0,0.1);
  }
  
  .thread-history-item.selected {
    background-color: rgba(0,0,255,0.1);
    border-left: 4px solid blue;
  }
  
  .thread-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
  }
  
  .continue-thread-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  /* Button States */
  button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transition: opacity 0.3s ease;
  }
  
  /* Notifications */
  .routing-notification {
      position: fixed;
      top: 20px;
      right: 20px;
      background: white;
      border-radius: 8px;
      padding: 15px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      z-index: 9999;
      max-width: 300px;
      animation: slideIn 0.3s ease-out;
  }
  
  @keyframes slideIn {
      from {
          transform: translateX(100%);
          opacity: 0;
      }
      to {
          transform: translateX(0);
          opacity: 1;
      }
  }
  
  
  
  
  
  
  
  .retry-message-btn {
      margin-top: 8px;
      padding: 4px 12px;
      background: #ff4444;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.3s ease;
  }
  
  .retry-message-btn:hover {
      background: #ff6666;
  }
  
  
  .error-content {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #ff4444;
  }
  
  .error-icon {
      font-size: 18px;
        color: #ff4444;
  }
  
  .message.error {
      border-left: 4px solid #ff4444;
      background-color: #fff5f5;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  /* Animation */
  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  /* Hover effect */
  .workspace-message-bubble:hover {
      border-color: #5E92B5;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  
  /* When message contains plotly */
  .workspace-message-bubble .plotly-container {
      margin: 10px 0;
      border-radius: 4px;
      overflow: hidden;
  }
  
  /* When message contains mermaid *
  .workspace-message-bubble .mermaid {
      margin: 10px 0;
      padding: 10px;
      background: white;
      border-radius: 4px;
  }
  
  */
  
  
  .close-error-button {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      padding: 5px;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: background-color 0.3s ease;
  }
  
  
  
  /* Error message hover effect */
  .error-message.detailed:hover {
      box-shadow: 0 4px 12px rgba(255, 68, 68, 0.15);
  }
  
  /* Improve button accessibility */
  .retry-button:focus,
  .details-button:focus,
  .close-error-button:focus {
      outline: 2px solid #2E5D79;
      outline-offset: 2px;
  }
  
  
  
  @keyframes slideDown {
      from {
          opacity: 0;
          transform: translateY(-10px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }
  
  
  
  
  
  
  
      .content-section {
          position: relative;
          margin: 1rem 0;
         
      }
  
      .content-actions {
          position: absolute;
          top: 0.5rem;
          right: 0.5rem;
          display: flex;
          gap: 0.5rem;
      }
  
      .copy-button,
      .download-button,
      .copy-code-button {
          background: #f0f0f0;
          border: none;
          border-radius: 4px;
          padding: 0.25rem 0.5rem;
          cursor: pointer;
          transition: all 0.2s ease;
      }
  
      .copy-button:hover,
      .download-button:hover,
      .copy-code-button:hover {
          background: #e0e0e0;
      }
  
      .copy-button.success {
          background: #4CAF50;
          color: white;
      }
  
      .copy-button.error {
          background: #f44336;
          color: white;
      }
  
      .copy-code-button {
          position: absolute;
          top: 0.5rem;
          right: 0.5rem;
      }
  
  
  
  
  
  /*
  
  .workspace-message-bubble {
      margin: 20px;
      padding: 0;
      border: 1px solid #3F78A0;
      border-radius: 8px;
      background: white;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .bubble-header {
      background: #2E5D79;
      color: white;
      padding: 10px 15px;
      border-radius: 8px 8px 0 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  
  .bubble-content {
      padding: 20px;
  }
  
  */
  
  
  .code-block-wrapper {
      margin: 15px 0;
      border: 1px solid #eee;
      border-radius: 4px;
      overflow: hidden;
  }
  
  .code-block-header {
      background: #f8f9fa;
      padding: 8px 12px;
      border-bottom: 1px solid #eee;
      font-weight: 500;
      color: #2E5D79;
  }
  
  
  /*
  
  .content-fallback {
      margin: 10px 0;
      padding: 10px;
      background: #fff3f3;
      border-left: 3px solid #ff4444;
      border-radius: 4px;
  }
  
  .fallback-notice {
      color: #666;
      font-size: 0.9em;
  }
  
  .fallback-content {
      margin-top: 10px;
      padding: 10px;
      background: #f8f9fa;
      border-radius: 4px;
      overflow-x: auto;
      font-family: monospace;
  }
  
  
  */
  
  
  
  
  
  
  /* General message styles */
  .message {
      margin: 0; /* Reset default margin */
      padding: 0; /* Reset default padding */
      background: none; /* No background by default */
      border: none; /* No border by default */
      margin-bottom: 30px; /* Add spacing between messages to accommodate timestamp */
      display: flex;
  /*    animation: messageSlideIn 0.3s ease;   */
        animation: fadeIn 0.5s ease;
  }
  
  
  /* Message container styles */
  .message-container {
      display: flex; /* Flex layout for alignment */
      align-items: flex-start; /* Align content to the top */
      margin: 8px 0; /* Vertical spacing between messages */
      max-width: 95%; /* Limit width of messages */
      position: relative; /* For positioning timestamps */
  }
  
  /* User message container styling */
  .message-container.user {
      margin-left: auto; /* Align user messages to the right */
      flex-direction: row-reverse; /* Reverse layout for user messages */
         max-width: 85%; 
    
  }
  
  /* Message content styles */
  .message-content {
      transition: height 0.3s ease, opacity 0.3s ease;
        overflow: hidden;
      font-size: 14px; /* Default text size */
      line-height: 1.6; /* Improve readability */
    /*  background: #f0f0f0; /* Default background for messages */
      border-radius: 12px; /* Rounded corners */
      padding: 8px 12px; /* Internal padding */
      position: relative; /* For positioning internal elements */
      margin: 0 8px; /* Horizontal spacing between messages */
      box-shadow: 0 4px 6px rgba(0,0,0,0.5);  
  }
  
  /* User message content styling */
  .message-container.user .message-content {
      background: #ff6f61; /* salmon background for user messages */
      color: white; /* White text for contrast */
      border-top-right-radius: 0px; /* Slightly sharper bottom-right corner */
          animation: fadeIn 0.7s ease;
  }
  
  /* AI message content styling */
  .message-container.ai .message-content {
      background: #e7f2f6; /* Default gray background for AI messages */
      color: black; /* White text for contrast */  
      border-top-left-radius: 0px; /* Slightly sharper bottom-left corner */
          animation: fadeIn 0.7s ease;
  }
  
  /* Error message content styling */
  .message-container.error .message-content {
      background: #fde8e8; /* Light red background for errors */
      color: #c81e1e; /* Red text for errors */
      border-bottom-left-radius: 2px; /* Consistent corner radius */
  }
  
  
  
  
  
  
  
  
  
  /* Avatar styles */
  .message-avatar {
      width: 28px; /* Fixed size for avatars */
      height: 28px; /* Maintain square shape */
      border-radius: 50%; /* Circular avatars */
      overflow: hidden; /* Crop overflowing content */
      flex-shrink: 0; /* Prevent shrinking */
  }
  
  .message-avatar img {
      width: 100%; /* Scale image to fit container */
      height: 100%; /* Maintain aspect ratio */
      object-fit: cover; /* Ensure image covers the entire container */
  }
  
  /* Timestamp styles */
  .message-timestamp {
      font-size: 0.75rem; /* Small text size */
      color: #666; /* Subtle gray text */
      position: absolute; /* Position relative to container */
      bottom: -23px; /* Place below the message */
      white-space: nowrap; /* Prevent text wrapping */
  }
  
  /* Timestamp positioning for user messages */
  .message-container.user .message-timestamp {
      right: 8px; /* Align with the right side of the message */
  }
  
  /* Timestamp positioning for AI messages */
  .message-container.ai .message-timestamp {
      left: 44px; /* Align with message content, accounting for avatar */
  }
  
  /* Markdown styles for headings */
  .message-content h1,
  .message-content h2,
  .workspace-content h2,
  .message-content h3,
  .message-content h4,
  .message-content h5,
  .message-content h6 {
     color: #252758;
      margin-top: 1em; /* Space above headings */
      margin-bottom: 0.5em; /* Space below headings */
      font-weight: 600; /* Semi-bold for emphasis */
  }
  
  /* Paragraph styles */
  .message-content p {
      margin-bottom: 1em; /* Space between paragraphs */
  }
  
  /* List styles */
  .message-content ul,
  .message-content ol {
    color: #252758;
      margin-bottom: 1em; /* Space below lists */
      padding-left: 2em; /* Indentation for list items */
  }
  
  .message-content li {
      margin-bottom: 0.5em; /* Space between list items */
  }
  
  /* Inline code styles */
  .message-content code {
      background-color: rgba(0, 0, 0, 0.05); /* Light gray background */
      padding: 0.2em 0.4em; /* Padding around inline code */
      border-radius: 3px; /* Rounded edges */
      font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; /* Monospace font */
      font-size: 85%; /* Slightly smaller size */
  }
  
  /* Preformatted block code styles */
  .message-content pre {
      background-color: #f6f8fa; /* Light gray background */
      border-radius: 6px; /* Rounded corners */
      padding: 16px; /* Padding inside block */
      overflow: auto; /* Allow scrolling for long lines */
      position: relative; /* For positioning copy button */
      margin: 1em 0; /* Spacing around block */
  }
  
  .message-content pre code {
      background-color: transparent; /* Remove additional background */
      padding: 0; /* Reset padding */
      font-size: 14px; /* Match text size */
      line-height: 1.45; /* Improve readability */
  }
  
  
  .message-content pre:hover .copy-code-button {
      opacity: 1; /* Show button on hover */
  }
  
  /* Blockquote styles */
  .message-content blockquote {
      margin: 0 0 1em; /* Space below blockquote */
      padding: 0 1em; /* Indentation inside blockquote */
      color: #6a737d; /* Subtle gray text */
      border-left: 0.25em solid #dfe2e5; /* Left border for emphasis */
  }
  
  /* Table styles */
  .message-content table {
      border-collapse: collapse; /* Remove gaps between cells */
      width: 100%; /* Full-width table */
      margin-bottom: 1em; /* Space below table */
  }
  
  .message-content table th,
  .message-content table td {
      padding: 6px 13px; /* Padding inside cells */
      border: 1px solid #dfe2e5; /* Borders for table cells */
  }
  
  .message-content table tr:nth-child(2n) {
      background-color: #f6f8fa; /* Alternate row coloring */
  }
  
  /* Image styles */
  .message-content img {
      max-width: 100%; /* Ensure images fit within container */
      height: auto; /* Maintain aspect ratio */
  }
  
  /* Link styles */
  .message-content a {
      color: #0366d6; /* Blue text for links */
      text-decoration: none; /* Remove underline by default */
  }
  
  .message-content a:hover {
      text-decoration: underline; /* Underline on hover */
  }
  
  /* AI message visualization OUTSIZE BOX */
  .message.ai-message {    
   /*   background-color: #9ccbfe; /* Pale blue background */ 
      border: 0px solid #ff7043; /* Orange border for emphasis */
      padding: 5px; /* No additional padding */
      margin: 5px 0; /* Vertical spacing between AI messages */
      border-radius: 4px; /* Slightly rounded corners */
      position: relative; /* For positioning label */
  }
  
  .message.ai-message::before {
      content: 'CHAT'; /* Label for AI messages */
      position: absolute; /* Positioned relative to the container */
      top: -10px; /* Above the message */
      left: 10px; /* Slightly indented */
   /*   background: #ff7043; /* Orange background */
      padding: 2px 6px; /* Internal padding */
      border-radius: 3px; /* Rounded corners */
      font-size: 10px; /* Small text */
      color: white; /* White text for contrast */
  }     
  
  
  /* Style for appended content blocks */
  .workspace-content-block {
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding-bottom: 20px;
  }
  
  .workspace-content-block:last-child {
    border-bottom: none;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  .trigger-content {
      display: flex;
      align-items: center;
      gap: 10px;
  }
  
  .trigger-icon {
      font-size: 20px;
  }
  
  
  .interaction-section {
      padding: 15px;
      border-bottom: 1px solid #f0f0f0;
  }
  
  .section-title {
      font-weight: bold;
      color: #666;
      margin-bottom: 10px;
  }
  
  .interaction-menu-item {
      display: flex;
      align-items: center;
      width: 100%;
      padding: 10px;
      background: none;
      border: none;
      text-align: left;
      cursor: pointer;
      transition: background-color 0.2s;
  }
  
  .interaction-menu-item:hover {
      background-color: #f5f5f5;
  }
  
  .item-icon {
      font-size: 24px;
      margin-right: 15px;
  }
  
  .item-details {
      display: flex;
      flex-direction: column;
  }
  
  .item-label {
      font-weight: bold;
  }
  
  .item-description {
      font-size: 0.8em;
      color: #888;
  }
  
  
  .message.typing-message {
    opacity: 0.9;
    transition: opacity 0.3s ease;
  }
  
  .message.typing-message .processing-text {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .message.typing-message .typing-text {
    color: black;
    font-style: italic;
    margin-left: 15px;
  }
  
  .message.typing-message .dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
  }
  
  .message.typing-message .dot:nth-child(1) { animation-delay: 0s; }
  .message.typing-message .dot:nth-child(2) { animation-delay: 0.2s; }
  .message.typing-message .dot:nth-child(3) { animation-delay: 0.4s; }
  
  @keyframes bounce {
    0%, 20% { 
      transform: translateY(0);
      opacity: 0.5;
    }
    50% { 
      transform: translateY(-8px);
      opacity: 1;
    }
    100% { 
      transform: translateY(0);
      opacity: 0.5;
    }
  }
  
  .message.typing-message.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  
  
  
  
  
  
  
  /*
  
  .ai-interaction-buttons-container {
      display: flex;
      align-items: center;
      gap: 8px; /* Space between buttons *
      margin-left: 10px; /* Optional: add some space from previous buttons *
  }
  
  .ai-interaction-trigger {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      background: transparent;
      border: none;
      cursor: pointer;
      border-radius: 4px;
      transition: all 0.3s ease;
  }
  
  .ai-interaction-trigger svg {
      width: 20px;
      height: 20px;
      stroke: #3F78A0;
  }
  
  .ai-interaction-trigger.default:hover {
      background-color: rgba(63, 120, 160, 0.1);
  }
  
  .ai-interaction-trigger.rounded {
      border-radius: 50%;
      background-color: rgba(63, 120, 160, 0.1);
  }
  
  .ai-interaction-trigger.filled {
      background-color: #3F78A0;
      color: white;
  }
  
  .ai-interaction-trigger.filled svg {
      stroke: white;
  }
  
  .ai-interaction-trigger:hover {
      transform: scale(1.1);
  }
  
  
  .ai-interaction-trigger {
      transition: all 0.3s ease;
      background: transparent;
      border: none;
      color: #3F78A0; /* Default icon color *
  }
  
  
  .ai-interaction-trigger.data-preserved {
      background: var(--button-color, #3F78A0);
      border-radius: 4px;
      color: white;
  }
  
  .ai-interaction-trigger.data-preserved svg {
      stroke: white;
  }
  
  .ai-interaction-menu {
      position: absolute;
      top: 100%;
      right: 0;
      width: 280px;
      background: #ffffff;
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      z-index: 100;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: all 0.2s;
  }
  
  .ai-interaction-menu:show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }  */
    
  
  
  
  
  
  
  
  
  
  
  .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
  }
  
  .close-panel {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
  }
  
  .panel-content {
      max-height: 300px;
      overflow-y: auto;
  }
  
  /* General button styles */
  .nav-top-button, .nav-bottom-button {
    background-color: var(--button-color);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
  }
  
  /* Hover effect */
  .nav-top-button:hover, .nav-bottom-button:hover {
    transform: scale(1.1);
    background: #2e4d69;
    color: white;
  }
  
  /* Arrow inside the button */
  .nav-top-button .arrow-icon path, 
  .nav-bottom-button .arrow-icon path {
    stroke: white; /* Ensure the arrows are white */
  }
  
  /* Send button styles */
  .send-button {
    background-color: var(--button-color);
    color: white;
    width: 50px;
    height: 36px;
    padding: 5px 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
  }
  
  /* Hover effect for send button */
  .send-button:hover, .send-selections-btn:hover {
    background-color: green;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  
  /* Ensure arrow and button alignment */
  .nav-top-button svg, .nav-bottom-button svg {
    vertical-align: middle;
  }
  
  
  
  
  /* Updated Control Bar Styles */
  .control-bar {
    position: fixed;
    bottom: -70px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    z-index: 10;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .control-bar .settings-button {
    position: absolute;
      bottom: -70px;
    right: 20px;
    padding: 8px 15px;
    background-color: #252758;
    color: white;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
  }
  
  .control-bar button,
  .control-bar input,
  .control-bar select {
    padding: 8px 15px;
    margin: 0;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    background-color: #252758;
    color: white;
    cursor: pointer;
    font-size: 12pt;
    position: relative;
  }
  
  .control-bar button:hover,
  .control-bar select:hover {
    background-color: #5d9aa0;
  }
  
  .control-bar input[type="range"] {
    width: 150px;
  }
  
  .control-bar .url-display {
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }
  
  .control-bar button::after,
  .control-bar select::after,
  .control-bar input::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
  }
  
  .control-bar button:hover::after,
  .control-bar select:hover::after,
  .control-bar input:hover::after {
    visibility: visible;
    opacity: 1;
  }
  
  /* Background Selector Dropdown */
  #background-url-selector {
    padding: 8px;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    font-size: 12pt;
    background-color: #3F78A0;
  }
  
  /* Updated Border Effects */
  .panel-border-neon-outline {
    border: 3px solid;
    border-image-source: linear-gradient(to right, #1a2a6c, #b21f1f, #fdbb2d);
    border-image-slice: 1;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6), 0 0 20px rgba(255, 255, 255, 0.7);
  }
  
  .panel-border-glow {
    border: 2px solid rgba(63, 120, 160, 0.4);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(63, 120, 160, 0.7);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    z-index: 1;
  }
  
  .panel-border-glow:hover {
    border-color: rgba(63, 120, 160, 0.8);
    box-shadow: 0 0 20px rgba(63, 120, 160, 0.6);
  }
  
  .panel-border-3d-shadow {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
  }
  
  .panel-border-3d-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.6);
  }
  
  .panel-border-inner-shadow {
    border-radius: 10px;
    box-shadow: inset 0px 4px 8px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .panel-border-frosted-glass {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
  }
  
  .panel-border-gradient-border {
    border: 3px solid;
    border-image-source: linear-gradient(to right, #ffffff, #1a73e8);
    border-image-slice: 1;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, box-shadow 0.3s ease;
  }
  
  .panel-border-gradient-border:hover {
    border-image-source: linear-gradient(to right, #ff8a00, #ff0080);
  }
  
  .panel-border-pulse-border {
    border: 2px solid rgba(63, 120, 160, 0.4);
    border-radius: 10px;
    animation: pulse-border 2s infinite;
  }
  
  @keyframes pulse-border {
    0%, 100% {
      border-color: rgba(63, 120, 160, 0.2);
      box-shadow: 0 0 10px rgba(63, 120, 160, 0.4);
    }
    50% {
      border-color: rgba(63, 120, 160, 0.8);
      box-shadow: 0 0 20px rgba(63, 120, 160, 0.8);
    }
  }
  
  /* Border Setting Popup */
  .border-settings-popup {
    position: fixed;
    top: 10px; /* Adjusted to appear along the top */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #3F78A0;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
  }
  
  .border-settings-popup label {
    font-size: 14px;
    color: #252758;
  }
  
  .border-settings-popup input {
    padding: 5px;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .border-settings-popup button {
    padding: 8px 15px;
    background: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }
  
  .control-bar .settings-button {
    position: relative; /* Change from absolute to relative */
    top: 0; /* Remove negative positioning */
    right: auto; /* Let it flow within the control bar */
    padding: 8px 15px;
    background-color: #252758;
    color: white;
    border: 1px solid #3F78A0;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
  }
  
  
  .border-settings-popup button:hover {
    background: #5d9aa0;
  }
  
  
  
  /* Reset Button Styles */
  .control-bar #reset-button {
    background-color: #ff4d4d;
    border-color: #ff4d4d;
  }
  
  .control-bar #reset-button:hover {
    background-color: #ff6666;
    border-color: #fff;
  
  }
  
  #background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
       background-image: url('https://i.imgur.com/tUF359T.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    animation: parallax-animation var(--parallax-speed, 30s) infinite alternate ease-in-out;
    transition: opacity 3s ease; /* Fade-in and fade-out */
    opacity: 0; /* Start hidden */
    z-index: -8; /* Ensure it stays behind other elements */
    
  }
  
  @keyframes parallax-animation {
    0% {
      background-position: 50% 100%;
    }
    50% {
      background-position: 50% 50%;
    }
    100% {
      background-position: 50% 0%;
    }
  }
  
  
  .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        pointer-events: none;
        z-index: -5;
      }
  
    
    
   
  
  .global-error-notification {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      background-color: #FF4500;
      color: white;
      padding: 15px;
      border-radius: 5px;
      z-index: 9999;
      text-align: center;
  }
  
  
  
  /*
  
  .ai-interaction-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
  }
  
  .widget-trigger {
    cursor: pointer;
    position: relative;
  }
  
  .widget-icon {
    width: 60px;
    height: 60px;
    background-color: #3F78A0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  
  .widget-icon:hover {
    transform: scale(1.1);
  }
  
  .widget-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
  }
  
  .widget-menu {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 15px;
  }
  
  .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .widget-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .widget-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .widget-option:hover {
    background-color: #e0e0e0;
  }
  
  .widget-option svg {
    width: 20px;
    height: 20px;
    stroke: #3F78A0;
  }
  
  .widget-quick-actions {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
  }
  
  .quick-action-buttons {
    display: flex;
    gap: 10px;
  }
  
  .quick-action {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  
  */
  
  
  
  
  
  .message-container.selected {
    border-color: #4A90E2;
    background-color: rgba(74, 144, 226, 0.2);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(74, 144, 226, 0.2);
  }
  
  
  .message-content.collapsed {
    max-height: 40px;
    transition: height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    opacity: 0.8;
    position: relative;
    text-overflow: ellipsis;
    
  }
  
  .message-content.collapsed::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255,255,255,0.7);
    padding: 0 5px;
  }
  
  
  /* Message Actions Styles */
  .message-actions {
      position: absolute;
      bottom: -25px;
      right: 35%;
      display: flex;
      gap: 5px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
      z-index: 10;
  }
  
  .message-actions .action-btn {
      background: transparent;
      border: 1px solid #e0e0e0;
      border-radius: 4px;
      padding: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
   .message-actions .action-btn:hover {
    transform: scale(1.0);
    border: 2px solid dodgerblue;
  }
  
  
  
  .edit-modal.fade-out {
      opacity: 0;
  }
  
  
  
  
  /* Delete Confirmation Styles */
  .delete-confirmation {
      position: absolute;
      bottom: -25px;
      right: -23%;
      width: 100%;
      z-index: 1000;
  }
  
  .delete-actions {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin-top: 10px;
  }
  
  .confirm-delete-btn,
  .cancel-delete-btn {
      padding: 5px 5px;
      border-radius: 4px;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  
  .confirm-delete-btn {
      background-color: #4CAF50;
      color: white;
      border: none;
  }
  
  .cancel-delete-btn {
      background-color: #F44336;
      color: white;
      border: none;
  }
  
  .confirm-delete-btn {
      background-color: #00ff0a;
      color: white;
      border: none;
  }
  .cancel-delete-btn {
      background-color: #ff1100;
      color: white;
      border: none;
  }
  
  
  .message-content.collapsed::after {
    content: '...';
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255,255,255,0.7);
    padding: 0 5px;
  }
  
  
  .message-content.user  {
      background-color: #ff6f61; /* Salmon color */
      color: white;
      border-top-right-radius: 0;
  }
  
  .message-content.ai {
      background-color: #e7f2f6; /* Light blue */
      color: black;
      border-top-left-radius: 0;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  .bulk-actions-dropdown {
      position: relative;
      z-index: 10;
      display: inline-block;
  }
  
  .bulk-actions-toggle {
      background-color: var(--button-color);
      color: var(--button-text-color);
      border: none;
      border-radius: 50%;
      padding: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s ease;
      z-index: 10;
  }
  
  .bulk-actions-menu {
      position: absolute;
      top: 100%;
      right: 0;
      background: white;
      border: 1px solid var(--border-color, #ddd);
      border-radius: 8px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      z-index: 100;
      min-width: 220px;
      padding: 10px;
      margin-top: 10px;
      display: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-10px);
      transition: 
          opacity 0.3s ease,
          visibility 0.3s ease,
          transform 0.3s ease;
  }
  
  .bulk-action-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      background: none;
      border: none;
      padding: 10px 12px;
      text-align: left;
      cursor: pointer;
      border-radius: 8px;
      transition: 
          background-color 0.3s ease,
          color 0.3s ease,
          transform 0.3s ease;
      font-size: 14px;
      color: #333;
  }
  
  .bulk-action-btn:hover {
      background-color: #f0f0f0;
      transform: translateX(5px);
    translate: transform 0.3s ease;
  }
  
  
  
  .bulk-actions-menu.visible {
      display: block;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
  }
  
  .bulk-action-btn.select-all-btn i {
      color: #4CAF50; /* Green for select */
  }
  
  .bulk-action-btn.deselect-all-btn i {
      color: #9E9E9E; /* Gray for deselect */
  }
  
  .bulk-action-btn.delete-selected-btn i {
      color: #F44336; /* Red for delete */
  }
  
  .bulk-action-btn.copy-selected-btn i {
      color: #2196F3; /* Blue for copy */
  }
  
  .bulk-action-btn.expand-all-btn i {
      color: #FF9800; /* Orange for expand */
  }
  
  .bulk-action-btn.collapse-all-btn i {
      color: #9C27B0; /* Purple for collapse */
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
      .bulk-actions-menu {
          min-width: 180px;
          right: -50px; /* Adjust for smaller screens */
      }
  }
  
  
  
  /* Scrollbar styling for the menu */
  .bulk-actions-menu::-webkit-scrollbar {
      width: 6px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 10px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 10px;
  }
  
  .bulk-actions-menu::-webkit-scrollbar-thumb:hover {
      background: #555;
  }
  
  
  
  
  .delete-confirmation-modal {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: white;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      z-index: 1000;
  }
  
  .confirmation-actions {
      display: flex;
      justify-content: space-between;
      margin-top: 15px;
  }
  
  .confirmation-actions button {
      padding: 10px 15px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
  }
  
  .confirm-delete {
      background-color: #f44336;
      color: white;
  }
  
  .cancel-delete {
      background-color: #e0e0e0;
      color: black;
  }
  
  
  
  
  
  .edit-modal-container {
      background: white;
      border-radius: 8px;
      max-width: 500px;
      width: 90%;
      padding: 20px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .edit-modal {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      opacity: 1;
      transition: opacity 0.3s ease;
  }
  
  .edit-modal-textarea {
      width: 100%;
      min-height: 150px;
      margin-bottom: 15px;
  }
  
  
  
  
  
  
  
  
  
  
  
  .plotly-hover-content {
      text-shadow: 0 0 3px rgba(255,255,255,0.5);
      font-weight: bold;
      color: #000;
      letter-spacing: 0.5px;
      
  }
  
  /* Optional: Additional styling for hover */
  .hoverlayer .tooltip {
      background-color: transparent !important;
      border: none !important;
  }
  
  
  
  
  
  
  
  /* Handsontable Styles */
  .handsontable {
      font-size: 14px;
      margin-bottom: 20px;
  }
  
  .handsontable th {
      background-color: #f2f2f2;
      font-weight: bold;
  }
  
  .handsontable td {
      padding: 6px;
  }
  
  .handsontable .current {
      background-color: #e6f3ff !important;
  }
  
  .handsontable .htDimmed {
      color: #999;
  }
  
  /* ECharts Styles */
  .echarts-container {
      width: 100%;
      height: 400px;
      margin-bottom: 20px;
  }
  
  /* KaTeX Styles */
  .katex-display {
      margin: 1em 0;
      text-align: center;
  }
  
  .katex {
      font-size: 1.1em;
  }
  
  .katex-error {
      color: #cc0000;
  }
  
  .katex-copy-button {
      font-size: 0.8em;
      padding: 2px 5px;
      margin-left: 5px;
      background-color: #f0f0f0;
      border: 1px solid #ccc;
      border-radius: 3px;
      cursor: pointer;
      display: none;
  }
  
  .math-inline:hover .katex-copy-button,
  .math-block:hover .katex-copy-button {
      display: inline-block;
  }
  
  /* Syntax Highlighting Styles */
  pre {
      background-color: #f4f4f4;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px;
      overflow-x: auto;
  }
  
  code {
      font-family: 'Courier New', Courier, monospace;
      font-size: 14px;
  }
  
  .hljs-keyword {
      color: #0000ff;
  }
  
  .hljs-string {
      color: #008000;
  }
  
  .hljs-number {
      color: #ff8000;
  }
  
  .hljs-comment {
      color: #808080;
      font-style: italic;
  }
  
  .copy-button {
      position: absolute;
      top: 5px;
      right: 5px;
      padding: 5px 10px;
      background-color: #f0f0f0;
      border: none;
      border-radius: 3px;
      cursor: pointer;
  }
  
  .line-number {
      display: inline-block;
      width: 2em;
      -webkit-user-select: none; /* For Safari */
      user-select: none;
      opacity: 0.3;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
      .tabulator, .handsontable, .echarts-container {
          font-size: 12px;
      }
  
      .katex {
          font-size: 1em;
      }
  
      pre, code {
          font-size: 12px;
      }
  }
  
  
  
  .question-container {
    margin-bottom: 20px;
  }
  
  .option-container {
    margin-bottom: 10px;
  }
  
  .rating-container {
    display: flex;
    justify-content: space-between;
    max-width: 200px;
  }
  
  #progress-tracker, #timer-display {
    margin-bottom: 20px;
  }
  
  #assessment-results, #assessment-analytics {
    margin-top: 30px;
  }
  
  .chart-bar {
    height: 20px;
    margin-bottom: 5px;
  }
  
  
  
  
  /* Tabulator Styles */
  .tabulator-container {
      margin-bottom: 20px;
  }
  
  .tabulator {
      font-family: Arial, sans-serif;
      font-size: 14px;
      border: 1px solid #ddd;
      background-color: #fff;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .tabulator .tabulator-header {
      background-color: #f5f5f5;
      border-bottom: 2px solid #ddd;
  }
  
  .tabulator .tabulator-header .tabulator-col {
      background-color: #f5f5f5;
      border-right: 1px solid #ddd;
      padding: 10px;
  }
  
  .tabulator .tabulator-header .tabulator-col-content {
      font-weight: bold;
      color: #333;
  }
  
  .tabulator .tabulator-row {
      border-bottom: 1px solid #eee;
  }
  
  .tabulator .tabulator-row .tabulator-cell {
      padding: 8px;
  }
  
  .tabulator .tabulator-row:nth-child(even) {
      background-color: #f9f9f9;
  }
  
  .tabulator .tabulator-footer {
      background-color: #f5f5f5;
      border-top: 1px solid #ddd;
      padding: 5px;
  }
  
  .tabulator-button-container {
      margin-bottom: 10px;
  }
  
  .tabulator-refresh-button,
  .tabulator-download-button {
      padding: 5px 10px;
      margin-right: 10px;
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-radius: 3px;
      cursor: pointer;
      transition: background-color 0.3s;
  }
  
  .tabulator-refresh-button:hover,
  .tabulator-download-button:hover {
      background-color: #e0e0e0;
  }
  
  /* RevealJS Styles */
  .reveal-container {
      margin-bottom: 20px;
  }
  
  .reveal {
      font-family: Arial, sans-serif;
  }
  
  .reveal .slides {
      border: 1px solid #ddd;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .reveal h1,
  .reveal h2,
  .reveal h3 {
      color: #333;
      font-weight: bold;
  }
  
  .reveal h1 { font-size: 2.5em; }
  .reveal h2 { font-size: 2em; }
  .reveal h3 { font-size: 1.5em; }
  
  .reveal p {
      font-size: 1.2em;
      line-height: 1.4;
      color: #444;
  }
  
  .reveal ul,
  .reveal ol {
      margin-left: 1.5em;
      color: #444;
  }
  
  .reveal a {
      color: #0066cc;
      text-decoration: none;
  }
  
  .reveal a:hover {
      text-decoration: underline;
  }
  
  .reveal .progress {
      height: 5px;
  }
  
  .revealjs-button-container {
      margin-bottom: 10px;
  }
  
  .revealjs-refresh-button,
  .revealjs-fullscreen-button {
      padding: 5px 10px;
      margin-right: 10px;
      background-color: #f0f0f0;
      border: 1px solid #ddd;
      border-radius: 3px;
      cursor: pointer;
      transition: background-color 0.3s;
  }
  
  .revealjs-refresh-button:hover,
  .revealjs-fullscreen-button:hover {
      background-color: #e0e0e0;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
      .tabulator,
      .reveal {
          font-size: 12px;
      }
  
      .tabulator-refresh-button,
      .tabulator-download-button,
      .revealjs-refresh-button,
      .revealjs-fullscreen-button {
          padding: 3px 6px;
          font-size: 12px;
      }
  }
  
  /*
  
  .voice-capture-btn,
  .comprehensive-capture-btn {
      display: flex;
      align-items: center;
      transition: all 0.3s ease;
  }
  
  .voice-capture-btn {
      background-color: #4CAF50; /* Green *
      color: white;
  }
  
  .comprehensive-capture-btn {
      background-color: #2196F3; /* Blue *
      color: white;
  }
  
  .voice-capture-btn i,
  .comprehensive-capture-btn i {
      margin-right: 0px;
  }
  
  /* Active states *
  .voice-capture-btn.active {
      background-color: Red;
  }
  
  .comprehensive-capture-btn.active {
      background-color: Red;
  }
  
  .export-transcript-btn,
  .view-transcripts-btn,
  .clear-transcripts-btn {
      z-index: 100;
  }
  
  
  .voice-toggle-btn, 
  .comprehensive-toggle-btn,
  .export-transcript-btn,
  .view-transcripts-btn,
  .clear-transcripts-btn {
      padding: 10px 15px;
      background-color: var(--primary-color);
      border: 1px solid #ddd;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
  }
  
  .voice-toggle-btn.active,
  .comprehensive-toggle-btn.active {
      background-color: #ff4136;
      color: white;
  }
  
  .voice-toggle-btn:hover,
  .comprehensive-toggle-btn:hover,
  .export-transcript-btn:hover,
  .view-transcripts-btn:hover,
  .clear-transcripts-btn:hover {
      background-color: #e0e0e0;
  }
  
  #console-log-area {
      font-size: 12px;
      line-height: 1.4;
  }
  
  .voice-notification {
      transition: opacity 0.3s ease;
  }
  
  .recording-log {
      position: fixed;
      bottom:-65px;
      left: 420px;
      width: 350px;
      max-height: 40px;
      overflow-y: auto;
      color: yellow;
      padding: 10px;
      border-radius: 5px;
      font-family: monospace;
      font-size: 12px;
      z-index: 10000;
            border: 0px solid #252758;
                background: rgba(0,0,0,0.8);
  }
  
  
  .recording-info {
      position: fixed;
      bottom: -65px;
      left: 420px;
      width: 350px;
    height: 40px;
      max-height: 100px;
      overflow-y: auto;
      color: yellow;
      padding: 10px;
      border-radius: 5px;
      font-family: monospace;
      font-size: 12px;
      z-index: 10000;
            border: 0px solid #252758;
                background: rgba(0,0,0,0.8);
  }
  */
  /*
  #voice-capture-btn:active {
      background-color: var(--color-red);
      color: white;
      border: 2px solid #FF0000; /* bright red border /  
      animation: pulse 1.5s infinite; 
  }    
  
  
  #recording-btn:active {
      background-color: var(--color-red);
      color: white;
      border: 2px solid #FF0000; /* bright red border /
      animation: pulse 1.5s infinite;
  }
  
  
  .recording-btn.active {
      background-color: var(--color-red);
      color: white;
      border: 2px solid #FF0000; /* bright red border /  
      animation: pulse 1.5s infinite;
  }
  */
  
  /*
  .voice-capture-btn {
      /* Base button styles *
      background-color: #007bff; /* Default blue /
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.3s ease;
  }
  
  
  
  
  .voice-capture-btn {
    margin-left: 10px;
    background-color: var(--button-color); 
    color: var(--button-text-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 20pt;
    padding: 5px 10px;
    transition: var(--button-hover-settings);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
    
  }
  
  
  .voice-capture-btn.active {
      /* Recording state styles *
      background-color: red;
      color: white;
      animation: pulse-recording 1.5s infinite;
      box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
  }
  
  */
  
  /* Pulse Animation for Active State */
  @keyframes pulse {
      0% {
          transform: scale(1);
          box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
      }
      70% {
          transform: scale(1.05);
          box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
      }
      100% {
          transform: scale(1);
          box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
      }
  }
  
  
  @keyframes pulse-border {
      0% {
          box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
          border: 2px solid rgba(255, 0, 0, 0.3);
      }
      50% {
          box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
          border: 2px solid rgba(255, 0, 0, 0.7);
      }
      100% {
          box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
          border: 2px solid rgba(255, 0, 0, 0.3);
      }
  }
  
  #chatSection.recording,
  .navigator.recording {
      animation: pulse-border 1.5s infinite;
      border: 2px solid red;
      box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
      transition: all 0.3s ease;
  }
  
  .recording-btn.active {
      border-color: red;
      box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  }
  
  
  
  
  
  
  
  
  
  
  
  #user-info {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  
  #user-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
  }
  
  
  
  
  
  
  
          /* Scoped variables for multi-panel */
          #multi-content-container {
              --primary-color: #1a73e8;
              --secondary-color: #5f6368;
              --background-color: #ffffff;
              --border-color: #dadce0;
              --text-primary: #202124;
              --text-secondary: #5f6368;
              --hover-bg: #f8f9fa;
              --active-bg: #e8f0fe;
              --error-color: #d93025;
              --success-color: #1e8e3e;
          }
  
          /* Navigation Bar - Scoped */
          #multi-content-container .navigation-bar {
              display: flex;
              align-items: center;
              padding: 8px;
              background: var(--background-color);
              border-bottom: 1px solid var(--border-color);
              gap: 8px;
          }
  
          /* Navigation Buttons - Scoped */
          #multi-content-container .nav-btn {
              padding: 8px;
              border: none;
              background: transparent;
              border-radius: 50%;
              cursor: pointer;
              color: var(--secondary-color);
              transition: background-color 0.2s;
          }
  
          #multi-content-container .nav-btn:hover {
              background: var(--hover-bg);
          }
  
          #multi-content-container .nav-btn:disabled {
              opacity: 0.5;
              cursor: not-allowed;
          }
  
          /* Tabs - Scoped */
          #multi-content-container .tabs-container {
              display: flex;
              flex: 1;
              min-width: 0;
              height: 36px;
              margin: 0 8px;
          }
  
          #multi-content-container .tabs-list {
              display: flex;
              overflow-x: hidden;
              gap: 2px;
          }
  
          #multi-content-container .tab {
              display: flex;
              align-items: center;
              padding: 8px 12px;
              background: var(--background-color);
              border: 1px solid var(--border-color);
              border-radius: 8px 8px 0 0;
              cursor: pointer;
              min-width: 100px;
              max-width: 200px;
          }
  
          #multi-content-container .tab.active {
              background: var(--active-bg);
              border-bottom: none;
          }
  
          #multi-content-container .tab-title {
              flex: 1;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
          }
  
          #multi-content-container .tab-close {
              padding: 4px;
              margin-left: 4px;
              border-radius: 50%;
          }
  
          #multi-content-container .tab-close:hover {
              background: var(--hover-bg);
          }
  
          /* Location Bar - Scoped */
          #multi-content-container .location-bar {
              flex: 2;
              display: flex;
              align-items: center;
              background: var(--hover-bg);
              border-radius: 24px;
              padding: 4px 8px;
          }
  
          #multi-content-container .url-input {
              flex: 1;
              border: none;
              background: transparent;
              padding: 8px;
              font-size: 14px;
              color: var(--text-primary);
          }
  
          #multi-content-container .url-input:focus {
              outline: none;
          }
  
          /* Content Area - Scoped */
          #multi-content-container .content-wrapper {
              position: relative;
              height: calc(100% - 64px);
              overflow: hidden;
          }
  
          #multi-content-container .content-iframe {
              width: 100%;
              height: 100%;
              border: none;
          }
  
          /* Typography Normalization - Scoped */
          #multi-content-container h1,
          #multi-content-container h2,
          #multi-content-container h3,
          #multi-content-container h4,
          #multi-content-container h5,
          #multi-content-container h6 {
              color: var(--text-primary);
              margin: 0;
              padding: 0;
          }
  
          #multi-content-container h1 { font-size: 24px; }
          #multi-content-container h2 { font-size: 20px; }
          #multi-content-container h3 { font-size: 16px; }
          #multi-content-container h4 { font-size: 14px; }
  
          /* Search Results Normalization - Scoped */
          #multi-content-container .search-results {
              padding: 20px;
              color: var(--text-primary);
          }
  
          #multi-content-container .search-item a {
              color: var(--primary-color);
              text-decoration: none;
          }
  
          #multi-content-container .search-item-url {
              color: var(--success-color);
          }
  
          #multi-content-container .search-item-snippet {
              color: var(--text-secondary);
          }
  
          /* Additional Controls - Scoped */
          #multi-content-container .additional-controls {
              display: flex;
              gap: 8px;
          }
  
          #multi-content-container .additional-controls button {
              padding: 8px;
              background: transparent;
              border: none;
              border-radius: 50%;
              cursor: pointer;
              color: var(--secondary-color);
          }
  
          #multi-content-container .additional-controls button:hover {
              background: var(--hover-bg);
          }
           /* Row 1: Input Controls */
          .input-controls-row {
              display: flex;
              align-items: center;
              gap: 10px;
              padding: 10px;
              background-color: var(--bg-color-inside);
              border-bottom: 1px solid var(--border-color);
          }
  
          .universal-input-container,
          .google-input-container {
              display: flex;
              align-items: center;
              gap: 5px;
              flex: 1;
          }
  
          .universal-input,
          .google-input-field {
              flex: 1;
              height: 40px;
              padding: 5px 10px;
              border: 1px solid var(--border-color);
              border-radius: 4px;
              font-size: 14px;
          }
  

  
          .navigation-controls {
              display: flex;
              justify-content: space-between;
              align-items: center;
              height: 100%;
          }
  
          .left-controls,
          .right-controls {
              display: flex;
              gap: 5px;
              align-items: center;
          }
          .tabsRow {
              height: 40px;
              padding: 5px 10px;
              background-color: var(--bg-color-inside);
              border-bottom: 1px solid var(--border-color);
          }
          
          .tabs-container {
              display: flex;
              align-items: center;
              height: 100%;
          }
          
          .add-tab-btn {
              order: -1; /* This ensures the button is always on the left */
              margin-right: 10px;
          }
          
          .tabs-list {
              display: flex;
              flex: 1;
              overflow-x: auto;
              gap: 5px;
          }
          
          .tab {
              display: flex;
              align-items: center;
              height: 32px;
              background: var(--button-color);
              border-radius: 4px 4px 0 0;
              padding: 0 10px;
              margin-right: 2px;
              cursor: pointer;
              max-width: 200px;
              overflow: hidden;
          }
          
          .tab-content {
              display: flex;
              align-items: center;
              gap: 8px;
              flex: 1;
          }
          
          .tab-title {
              color: white;
              font-size: 12px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
              flex: 1;
          }
          
          .tab-close {
              padding: 4px;
              border: none;
              background: transparent;
              color: var(--button-text-color);
              cursor: pointer;
              opacity: 0.7;
          }
          
          .tab-close:hover {
              opacity: 1;
          }
          
          /* Common Button Styles */
          .nav-btn {
              width: 40px;
              height: 40px;
              padding: 8px;
              margin: 0 5px;
              background-color: var(--button-color);
              color: var(--button-text-color);
              border: none;
              border-radius: 4px;
              cursor: pointer;
              font-size: 14px;
              transition: var(--button-hover-settings);
              box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
              display: flex;
              align-items: center;
              justify-content: center;
          }
  
          .nav-btn:hover {
              transform: scale(1.00);
              background-color: var(--button-hover-color);
              border: var(--button-hover-border);
          }
  
          .nav-btn:active {
              transform: scale(1.00);
          }
  
          .nav-btn i {
              font-size: 16px;
          }
  
          /* Tab Styles */
          .tab.active {
              background: var(--button-hover-color);
          }
  
  
      .tab-close:hover {
          opacity: 1;
      }
  
      /* Link Modal */
      .link-modal {
          position: fixed;
          background: var(--bg-color-inside);
          border-radius: 4px;
          box-shadow: 0 2px 10px rgba(0,0,0,0.2);
          display: none;
          z-index: 1000;
      }
  
      .link-modal.active {
          display: block;
      }
  
      .link-modal-content {
          padding: 8px;
      }
  
      .link-option {
          display: flex;
          align-items: center;
          gap: 8px;
          width: 100%;
          padding: 8px;
          border: none;
          background: transparent;
          cursor: pointer;
          color: var(--text-primary);
      }
  
      .link-option:hover {
          background: var(--hover-bg);
      }
  
      /* Pagination */
      .search-pagination {
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 10px;
          padding: 20px 0;
          border-top: 1px solid var(--border-color);
      }
  
      .pagination-controls {
          display: flex;
          gap: 5px;
          align-items: center;
      }
  
      .page-btn {
          padding: 8px 12px;
          border: 1px solid var(--border-color);
          background: var(--bg-color-inside);
          border-radius: 4px;
          cursor: pointer;
      }
  
      .page-btn.active {
          background: var(--button-color);
          color: var(--button-text-color);
      }
  
      .page-btn:disabled {
          opacity: 0.5;
          cursor: not-allowed;
      }
  
      .page-ellipsis {
          padding: 0 5px;
      }
  
  
          /* Navigation History Styles */
          .history-preview-dropdown {
              position: absolute;
              top: 100%;
              background: var(--bg-color-inside);
              border: 1px solid var(--border-color);
              border-radius: 4px;
              box-shadow: 0 2px 10px rgba(0,0,0,0.1);
              display: none;
              z-index: 1000;
          }
  
          /* Find in Page Styles */
          .finder-bar {
              position: fixed;
              top: 20px;
              right: 20px;
              background: var(--bg-color-inside);
              border: 1px solid var(--border-color);
              border-radius: 4px;
              padding: 8px;
              display: none;
              z-index: 1000;
          }
  
          .finder-highlight {
              background-color: yellow;
          }
  
          .finder-highlight.current {
              background-color: orange;
          }
  
          /* View Controls Styles */
          .view-controls {
              display: flex;
              gap: 10px;
              align-items: center;
          }
  
          /* Tab Styles */
          .tab.suspended {
              opacity: 0.7;
          }
  
          .tab.pinned {
              width: 40px;
              padding: 0;
              justify-content: center;
          }
  
  
  
  
  
      .google-workspace-frame {
          width: 100%;
          height: calc(100% - 40px); /* Account for toolbar */
          border: none;
      }
  
      .google-workspace-toolbar {
          height: 40px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 0 10px;
          background: var(--bg-color-inside);
          border-bottom: 1px solid var(--border-color);
      }
  
      .google-workspace-toolbar button {
          padding: 5px 10px;
          margin: 0 5px;
          background: var(--button-color);
          color: var(--button-text-color);
          border: none;
          border-radius: 4px;
          cursor: pointer;
      }
  
      .google-workspace-toolbar button:hover {
          background: var(--button-hover-color);
      }
  
      .google-workspace-loading {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          height: 100%;
      }
  
      .spinner {
          width: 40px;
          height: 40px;
          border: 4px solid #f3f3f3;
          border-top: 4px solid var(--button-color);
          border-radius: 50%;
          animation: spin 1s linear infinite;
      }
  
      @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
      }
  
  
  
  
  
  
  
  
  .enhanced-send-button {
    background-color: var(--button-color);
    color: white;
    width: 50px;
    height: 30px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
  } 
  .enhanced-send-button:hover {
    background-color: pink;
    color: white;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }
  
  #enhanced-send-loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
  }
  
  .spinner {
      display: flex;
      justify-content: center;
  }
  
  .spinner > div {
      width: 18px;
      height: 18px;
      background-color: #fff;
      border-radius: 100%;
      display: inline-block;
      animation: sk-bouncedelay 1.4s infinite ease-in-out both;
  }
  
  .spinner .bounce1 {
      animation-delay: -0.32s;
  }
  
  .spinner .bounce2 {
      animation-delay: -0.16s;
  }
  
  @keyframes sk-bouncedelay {
      0%, 80%, 100% { 
          transform: scale(0);
      } 40% { 
          transform: scale(1.0);
      }
  }
  
  
  
  .workspacestart-container {
      margin-top: 50px;
      padding: 0px;
      height: 100px;
      background-color: transparent;
      border-radius: 8px;
      border: 0px solid red;
   /*   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);   */
  }
  
  .workspacestart-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
  }
  
  .workspacestart-timestamp {
      font-size: 0.9em;
      color: #666;
      
  }
  
  .workspacestart-number {
      font-size: 0.9em;
      font-weight: bold;
      color: #3F78A0;
  }
  
  .workspacestart-gradient-lines {
      position: relative;
      height: 25px;
  }
  
  .workspacestart-line {
      position: absolute;
      width: 100%;
      height: 5px;
  }
  
  .workspacestart-line1 {
      top: 0;
      background: linear-gradient(to right, #ff6f61, transparent);
  }
  
  .workspacestart-line2 {
      bottom: 0;
      background: linear-gradient(to left, #ff6f61, transparent);
  }
  
  
  
  
  
  
  .workspace-content .python-code-container {
      margin-bottom: 20px;
      border: 1px solid #ddd;
      border-radius: 4px;
      overflow: hidden;
  }
  
  .workspace-content .python-code-container pre {
      margin: 0;
      padding: 10px;
      background-color: #f5f5f5;
  }
  
  .workspace-content .python-result-container {
      padding: 10px;
      border-top: 1px solid #ddd;
  }
  
  .workspace-content .python-loading-indicator {
      text-align: center;
      padding: 10px;
      font-style: italic;
      color: #666;
  }
  
  .workspace-content .python-processing-error {
      color: #d9534f;
      font-weight: bold;
      padding: 10px;
      background-color: #f2dede;
      border: 1px solid #ebccd1;
      border-radius: 4px;
  }
  
  .workspace-content .python-result-output {
      background-color: #f9f9f9;
      border: 1px solid #e1e1e8;
      border-radius: 4px;
      padding: 10px;
      margin-top: 10px;
      white-space: pre-wrap;
      word-break: break-word;
  }
  
  .workspace-content .python-result-log {
      font-family: monospace;
      font-size: 0.9em;
      color: #333;
      background-color: #f5f5f5;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 10px;
      margin-top: 10px;
      max-height: 200px;
      overflow-y: auto;
  }
  
  
  .workspace-content .python-analysis-container {
      margin-bottom: 20px;
      border: 1px solid #ddd;
      border-radius: 4px;
      overflow: hidden;
  }
  
  .workspace-content .python-analysis-container pre {
      margin: 0;
      padding: 10px;
      background-color: #f5f5f5;
      white-space: pre-wrap;
      word-wrap: break-word;
  }
  
  .workspace-content .python-analysis-result {
      padding: 10px;
      border-top: 1px solid #ddd;
  }
  
  .workspace-content .python-analysis-result h4 {
      margin-top: 0;
      color: #333;
  }
  
  .workspace-content .python-analysis-result pre {
      background-color: #f9f9f9;
      border: 1px solid #e1e1e8;
      border-radius: 4px;
      padding: 10px;
  }
  
  .workspace-content .python-analysis-result .error {
      color: #d9534f;
      background-color: #f2dede;
      border-color: #ebccd1;
  }
  
  .python-placeholder {
      background-color: #f5f5f5;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px;
      margin-bottom: 15px;
  }
  
  .loading-indicator {
      text-align: center;
      color: #666;
      font-style: italic;
  }
  
  .python-result, .python-error {
      white-space: pre-wrap;
      word-wrap: break-word;
      background-color: #f9f9f9;
      border: 1px solid #e1e1e8;
      border-radius: 4px;
      padding: 10px;
      margin-top: 10px;
  }
  
  .python-error {
      color: #d9534f;
      background-color: #f2dede;
      border-color: #ebccd1;
  }
  
  
  .mermaid-diagram-btn {
      transition: all 0.3s ease;
      position: relative;
  }
  
  .mermaid-diagram-btn:hover {
      transform: scale(1.05);
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }
  
  .mermaid-diagram-btn .badge {
      transition: all 0.3s ease;
  }
  
  
  
  
  .rightControls #contentModeToggleContainer {
      display: flex;
      align-items: center;
      margin-left: 10px;
  }
  
/* Content mode toggle */
.content-mode-toggle-btn {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border: 1px solid var(--primary-color, #252758);
    border-radius: 4px;
    padding: 5px 10px;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .content-mode-toggle-btn.overwrite {
    background-color: #ffeeee;
    border-color: #ff6b6b;
  }

  
  
  .content-mode-toggle-btn:hover {
      background-color: #e0e0e0;
  }
  
  .toggle-slider {
      display: flex;
      align-items: center;
  }
  
  .toggle-icon {
      margin-right: 8px;
      color: #3F78A0;
      transition: transform 0.3s ease;
  }
  
  .toggle-text {
      font-size: 0.9em;
      color: #3F78A0;
  }
  
  .content-mode-toggle-btn.overwrite .toggle-icon i {
    transform: rotate(45deg);
  }
  
  .content-mode-toggle-btn.overwrite .toggle-text {
    color: #ff6b6b;
  }
  

  
  
  
  
  .inline-code {
      background-color: #f4f4f4;
      border-radius: 3px;
      padding: 2px 4px;
      font-family: monospace;
      font-size: 0.9em;
  }
  
  pre {
      background-color: #f4f4f4;
      border: 1px solid #ddd;
      border-radius: 4px;
      padding: 10px;
      position: relative;
  }
  
  .code-copy-btn {
      position: absolute;
      top: 5px;
      right: 5px;
      background-color: #007bff;
      color: white;
      border: none;
      padding: 5px 10px;
      border-radius: 3px;
      cursor: pointer;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  /*
  
     /* Export Modal Styles *//*
     #export-format-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }
  
    .export-modal-content {
      background-color: white;
      border-radius: 8px;
      padding: 20px;
      width: 300px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }
  
    .export-format-options {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin: 20px 0;
    }
  
    .export-format-options label {
      display: flex;
      align-items: center;
      gap: 10px;
    }
  
    .export-modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }
  
    /* Notification Styles */
    /*.export-notification,
    .export-error-notification {
      position: fixed;
      top: 20px;
      right: 20px;
      padding: 10px 20px;
      border-radius: 4px;
      color: white;
      z-index: 1100;
    }*/
  
  
  
  
  
  
  
  
  /*.export-dropdown {
      position: relative;
      display: inline-block;
    }
    
    .export-menu {
      display: none;
      position: absolute;
      right: 0;
      background-color: #f9f9f9;
      min-width: 160px;
      box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
      z-index: 1;
      top: -160px;
      border-radius: 4px;
    }
    
    .export-menu .export-option {
      color: black;
      padding: 12px 16px;
      text-decoration: none;
      display: block;
      text-align: left;
      border: none;
      width: 100%;
      background: none;
      cursor: pointer;
    }
    
    .export-menu .export-option:hover {
      background-color: #f1f1f1;
    }
    
    /*.export-dropdown:hover .export-menu {
      display: block;
    }*/
    
    /*.notificationArea {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1000;
    }*/
    
    /*.notification {
      padding: 10px 15px;
      margin-bottom: 10px;
      border-radius: 4px;
      color: white;
    }
    
    .notification.success {
      background-color: #4CAF50;
    }
    
    .notification.error {
      background-color: #f44336;
    }
    
    .export-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.4);
    }*/
    
    /*.export-modal-content {
        background-color: #fefefe;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 300px;
        text-align: center;
    }
    
    
    .export-formats button {
        display: block;
        width: 100%;
        padding: 10px;
        margin: 10px 0;
    }
    
    .error-notification {
        position: fixed;
        top: 20px;
        right: 20px;
        background-color: #f44336;
        color: white;
        padding: 15px;
        border-radius: 5px;
        z-index: 1100;
    }
    
    .export-progress {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
    }
    
    .export-progress.active {
        display: block;
    }
    
    .export-progress-bar {
        width: 100%;
        height: 10px;
        background: #eee;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .export-progress-bar-fill {
        height: 100%;
        background: #4CAF50;
        width: 0;
        transition: width 0.3s ease;
    }
    
    /* Export-related styles *//*
    .export-notification {
        padding: 10px 15px;
        border-radius: 4px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        animation: slideIn 0.3s ease-out;
    }
    
    .export-notification.success {
        background-color: #4CAF50;
        color: white;
    }
    
    .export-notification.error {
        background-color: #f44336;
        color: white;
    } 
    
    @keyframes slideIn {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }*/
    
  
  
  
  
  
  
  
    /* Conversation Modal Styles */
  .modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 2000;
  }
  
  .modal-content {
      background: white;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 10px 20px rgba(0,0,0,0.2);
      max-width: 400px;
      width: 90%;
  }
  
  .modal-actions {
      display: flex;
      justify-content: space-between;
  }
  
  .conversation-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 15px;
  }
  
  .panel-section-title {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 15px;
      color: var(--text-color);
  }
  
  .panel-section-title i {
      color: var(--primary-color);
  }
  
  
  /*EXPORT MODAL*/
  
  .export-menu {
      display: none;
      position: absolute;
      right: 0;
      background-color: #f9f9f9;
      min-width: 160px;
      box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
      z-index: 1;
      top: -160px;
      border-radius: 4px;
    }
    
    .export-menu .export-option {
      color: black;
      padding: 12px 16px;
      text-decoration: none;
      display: block;
      text-align: left;
      border: none;
      width: 100%;
      background: none;
      cursor: pointer;
    }
    
    .export-menu .export-option:hover {
      background-color: #f1f1f1;
    }
    
    /*.export-dropdown:hover .export-menu {
      display: block;
    }*/
    
    /*.notificationArea {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1000;
    }*/
    
    .notification {
      padding: 10px 15px;
      margin-bottom: 10px;
      border-radius: 4px;
      color: white;
    }
    
    .notification.success {
      background-color: #4CAF50;
    }
    
    .notification.error {
      background-color: #f44336;
    }
    
    .export-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.4);
    }
    
    .export-modal-content {
        background-color: #fefefe;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 300px;
        text-align: center;
    }
    
    
    .export-formats button {
        display: block;
        width: 100%;
        padding: 10px;
        margin: 10px 0;
    }
    
    .error-notification {
        position: fixed;
        top: 20px;
        right: 20px;
        background-color: #f44336;
        color: white;
        padding: 15px;
        border-radius: 5px;
        z-index: 1100;
    }
    
    .export-progress {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
    }
    
    .export-progress.active {
        display: block;
    }
    
    .export-progress-bar {
        width: 100%;
        height: 10px;
        background: #eee;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .export-progress-bar-fill {
        height: 100%;
        background: #4CAF50;
        width: 0;
        transition: width 0.3s ease;
    }
    
    /* Export-related styles */
    .export-notification {
        padding: 10px 15px;
        border-radius: 4px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        animation: slideIn 0.3s ease-out;
    }
    
    .export-notification.success {
        background-color: #4CAF50;
        color: white;
    }
    
    .export-notification.error {
        background-color: #f44336;
        color: white;
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
 










  .markdown-editor, 
  .plotly-editor, 
  .mermaid-editor {
      display: flex;
      flex-direction: column;
      width: 100%; /* Fill the entire width of the container */
      height: 200px; /* Fixed height of 200 pixels */
      max-width: 100%; /* Ensure it doesn't overflow */
  }
  
  
  .markdown-input, 
  .plotly-json-input, 
  .mermaid-input {
      width: 100%; /* Explicitly set to 100% */
      max-width: 100%; /* Prevent overflow */
      box-sizing: border-box; /* Include padding and border in width calculation */
      resize: both; /* Allow both vertical and horizontal resizing */
      min-height: 200px; /* Minimum height */
      overflow: auto; /* Add scrollbars if content exceeds area */
      padding: 10px; /* Internal padding */
      border: 1px solid #ddd; /* Border for visibility */
  }
  
  .markdown-preview, 
  .mermaid-preview {
      border: 1px solid #ddd;
      padding: 10px;
      margin-bottom: 10px;
  }
  
    
    /* END EDIT FUNCTION FOR SELECTION REVIEW */
  





/* Quick action buttons */
.quick-action-btn {
    padding: 5px 10px;
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.quick-action-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Load workspaces button */
.load-workspaces-btn {
    padding: 5px 10px;
    margin-left: 5px;
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.load-workspaces-btn:hover {
    background-color: #3b3f8c;
}

.load-workspaces-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;

}



/**
 * Enhanced Mermaid Diagram CSS
 * Version 3.0.0
 * 
 * Comprehensive styling for the Mermaid diagram system with AI integration,
 * better error handling, and expanded theme options.
 */

/* Mermaid Container Styles */
.mermaid-container {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    min-height: 100px;
    border: 1px solid #e0e0e0;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    margin: 15px 0;
    background-color: white;
    padding-top: 40px;
  }
  
  .mermaid-container:hover {
    border: 1px solid #4E92B5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .mermaid-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
  }
  
  .mermaid-container:hover .mermaid-controls {
    opacity: 1;
  }
  
  .mermaid-export-button,
  .mermaid-swap-button,
  .mermaid-expand-modal,
  .mermaid-reset-view-button {
    background-color: #252758;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    height: 30px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .mermaid-export-button:hover,
  .mermaid-swap-button:hover,
  .mermaid-expand-modal:hover,
  .mermaid-reset-view-button:hover {
    background-color: #4E92B5;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
  }
  
  .mermaid-export-button:focus,
  .mermaid-swap-button:focus,
  .mermaid-expand-modal:focus,
  .mermaid-reset-view-button:focus {
    outline: 2px solid #4E92B5;
    outline-offset: 2px;
  }
  
  .mermaid-export-button:active,
  .mermaid-swap-button:active,
  .mermaid-expand-modal:active,
  .mermaid-reset-view-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  }
  
  .mermaid-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #252758;
    cursor: se-resize;
    border-top-left-radius: 3px;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .mermaid-resize-handle:hover {
    opacity: 1;
    transform: scale(1.1);
  }
  
  .mermaid-vertical-resize-handle {
    width: 100%;
    height: 12px;
    cursor: ns-resize;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.05));
    border-top: 1px dashed #e0e0e0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
  }
  
  .mermaid-vertical-resize-handle:hover,
  .mermaid-preview-container:hover .mermaid-vertical-resize-handle,
  .mermaid-content-editor:hover + .mermaid-vertical-resize-handle {
    opacity: 1;
  }
  
  /* In-Modal Notification Area */
  .mermaid-notification-area {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    position: relative;
    display: none;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .mermaid-notification-error {
    background-color: #FFEBEE;
    border-left: 4px solid #F44336;
    color: #d32f2f;
  }
  
  .mermaid-notification-warning {
    background-color: #FFF8E1;
    border-left: 4px solid #FFC107;
    color: #FF8F00;
  }
  
  .mermaid-notification-info {
    background-color: #E3F2FD;
    border-left: 4px solid #2196F3;
    color: #0D47A1;
  }
  
  .mermaid-notification-success {
    background-color: #E8F5E9;
    border-left: 4px solid #4CAF50;
    color: #2E7D32;
  }
  
  .mermaid-notification-message {
    margin-right: 30px;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .mermaid-notification-area details {
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 4px;
  }
  
  .mermaid-notification-area summary {
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    margin-bottom: 5px;
  }
  
  .mermaid-notification-area pre {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
  }
  
  .mermaid-notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
  }
  
  .mermaid-notification-close:hover {
    opacity: 1;
  }
  
  /* Mermaid Modal Styles */
  .mermaid-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(2px);
  }
  
  .mermaid-modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 90vw !important;
    height: 90vh !important;
    max-width: none !important;
    max-height: none !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: modalFadeIn 0.3s ease-out;
  }
  
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .mermaid-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 15px;
  }
  
  .mermaid-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 15;
  }
  
  .mermaid-modal-close:hover {
    background-color: #d32f2f;
    transform: rotate(90deg);
  }
  
  .mermaid-modal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
  }
  
  .mermaid-top-controls {
    justify-content: flex-start;
  }
  
  .mermaid-bottom-controls {
    justify-content: space-between;
    margin-top: auto;
  }
  
  .mermaid-modal-controls select,
  .mermaid-modal-controls input {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.3s ease;
  }
  
  .mermaid-modal-controls select:hover,
  .mermaid-modal-controls input:hover {
    border-color: #4E92B5;
  }
  
  .mermaid-modal-controls select:focus,
  .mermaid-modal-controls input:focus {
    border-color: #252758;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 146, 181, 0.2);
  }
  
  .mermaid-modal-controls input[type="number"] {
    width: 70px;
  }
  
  .mermaid-modal-controls button {
    padding: 5px 10px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    height: 30px;
    min-width: 80px;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  
  .mermaid-modal-save-button,
  .mermaid-insert-button {
    background-color: #4CAF50;
  }
  
  .mermaid-modal-export-button,
  .mermaid-dropdown-toggle {
    background-color: #2196F3;
  }
  
  .mermaid-modal-save-button:hover,
  .mermaid-insert-button:hover {
    background-color: #388e3c;
  }
  
  .mermaid-modal-export-button:hover,
  .mermaid-dropdown-toggle:hover {
    background-color: #1976d2;
  }
  
  .mermaid-preview-button,
  .mermaid-format-button {
    background-color: #252758;
  }
  
  .mermaid-preview-button:hover,
  .mermaid-format-button:hover {
    background-color: #4E92B5;
  }
  
  .mermaid-preview-container {
    flex-grow: 1;
    overflow: auto;
    border: 1px solid #000;
    border-radius: 5px;
    background-color: white;
    min-height: 200px;
    position: relative;
    resize: vertical;
    margin-bottom: 15px;
    padding: 10px;
  }
  
  .mermaid-svg-container {
    width: 100%;
    overflow: auto;
    position: relative;
  }
  
  .mermaid-content-editor {
    width: 100%;
    min-height: 150px;
    overflow: auto;
    resize: vertical;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
  }
  
  .mermaid-content-editor:focus {
    border-color: #252758;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 146, 181, 0.2);
  }
  
  .mermaid-content-editor::placeholder {
    color: #aaa;
  }
  
  .mermaid-node-shape-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
  }
  
  .mermaid-apply-shape-button {
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .mermaid-apply-shape-button:hover {
    background-color: #4E92B5;
  }
  
  .mermaid-apply-shape-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
  }
  
  .mermaid-zoom-controls {
    display: flex;
    gap: 5px;
    align-items: center;
  }
  
  .mermaid-zoom-controls button {
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    min-width: auto;
  }
  
  .mermaid-zoom-controls button:hover {
    background-color: #4E92B5;
  }
  
  .mermaid-control-wrapper {
    display: flex;
    flex-direction: column;
  }
  
  .mermaid-control-wrapper label {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #333333;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  /* Export Options Styles */
  .mermaid-export-options {
    background-color: #f5f5f5;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
  }
  
  .mermaid-export-options label {
    font-size: 12px;
    font-weight: 500;
    color: #333333;
  }
  
  .mermaid-export-dropdown {
    position: relative;
    display: inline-block;
  }
  
  .mermaid-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    min-width: 180px;
    background-color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 10px;
    z-index: 100;
  }
  
  .mermaid-dropdown-button {
    width: 100%;
    text-align: left;
    background-color: transparent;
    color: #252758;
    padding: 8px 10px;
    margin: 5px 0;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 0;
    height: auto;
    display: block;
  }
  
  .mermaid-dropdown-button:hover {
    background-color: #f0f0f0;
  }
  
  /* Error Styles */
  .mermaid-error {
    padding: 20px;
    background-color: #ffebee;
    color: #d32f2f;
    border-radius: 5px;
    border-left: 4px solid #d32f2f;
  }
  
  .mermaid-error h3 {
    margin-top: 0;
  }
  
  .mermaid-error details {
    margin-top: 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 3px;
  }
  
  .mermaid-error summary {
    cursor: pointer;
    color: #d32f2f;
    font-weight: bold;
  }
  
  .mermaid-error pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    margin-top: 10px;
  }
  
  /* Base SVG styling */
  .mermaid svg {
    display: block;
    max-width: 100%;
    height: auto;
  }
  
  /* Checkbox styling for export options */
  .mermaid-export-options input[type="checkbox"] {
    margin-right: 5px;
  }
  
  .mermaid-export-options label[for^="export-transparency"] {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
  }
  
  /* Theme-specific styles */
  .theme-ocean .node rect,
  .theme-ocean .node circle,
  .theme-ocean .node ellipse,
  .theme-ocean .node polygon,
  .theme-ocean .node path {
    fill: #bde0fe;
    stroke: #01386a;
  }
  
  .theme-sunset .node rect,
  .theme-sunset .node circle,
  .theme-sunset .node ellipse,
  .theme-sunset .node polygon,
  .theme-sunset .node path {
    fill: #ffda00;
    stroke: #ff7e00;
  }
  
  .theme-earth .node rect,
  .theme-earth .node circle,
  .theme-earth .node ellipse,
  .theme-earth .node polygon,
  .theme-earth .node path {
    fill: #c9b6a6;
    stroke: #774936;
  }
  
  .theme-neon .node rect,
  .theme-neon .node circle,
  .theme-neon .node ellipse,
  .theme-neon .node polygon,
  .theme-neon .node path {
    fill: #000000;
    stroke: #ff00ff;
  }
  
  .theme-monochrome .node rect,
  .theme-monochrome .node circle,
  .theme-monochrome .node ellipse,
  .theme-monochrome .node polygon,
  .theme-monochrome .node path {
    fill: #f9f9f9;
    stroke: #333333;
  }
  
  /* Hide the global Mermaid error notification bar */
  .mermaid-error-notification-bar,
  .mermaid > .error,
  .mermaid > .error-text,
  .mermaid > .error-icon {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* AI Editor Split Layout */
  .mermaid-ai-editor-container {
    display: flex;
    width: 100%;
    min-height: 600px;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background-color: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .mermaid-code-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-right: 1px solid #e0e0e0;
    background-color: white;
  }
  
  .mermaid-ai-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
  }
  
  .mermaid-code-header,
  .mermaid-ai-header {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
  }
  
  .mermaid-code-header h3,
  .mermaid-ai-header h3 {
    margin: 0;
    font-size: 18px;
    color: #252758;
  }
  
  .mermaid-ai-header {
    padding: 10px 15px;
  }
  
  .mermaid-preview-area {
    flex-grow: 1;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
  }
  
  .mermaid-ai-chat-area {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: white;
    border-radius: 5px;
    margin: 0 15px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .mermaid-ai-input-container {
    display: flex;
    padding: 15px;
    gap: 10px;
    align-items: flex-end;
  }
  
  .mermaid-ai-input {
    flex-grow: 1;
    resize: vertical;
    min-height: 60px;
    max-height: 200px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s ease;
  }
  
  .mermaid-ai-input:focus {
    border-color: #4E92B5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(78, 146, 181, 0.2);
  }
  
  .mermaid-ai-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4E92B5;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
  }
  
  .mermaid-ai-send-button:hover {
    background-color: #252758;
    transform: scale(1.05);
  }
  
  .mermaid-extract-code-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
  }
  
  .mermaid-extract-code-button:hover {
    background-color: #388e3c;
  }
  
  .mermaid-preview-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }
  
  .mermaid-ai-message {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-out;
  }
  
  .mermaid-ai-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .user-message .mermaid-ai-avatar {
    background-color: #E3F2FD;
    color: #1976d2;
  }
  
  .assistant-message .mermaid-ai-avatar {
    background-color: #E8F5E9;
    color: #388e3c;
  }
  
  .mermaid-ai-content {
    flex-grow: 1;
    background-color: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    word-break: break-word;
    overflow: auto;
    line-height: 1.5;
  }
  
  .user-message .mermaid-ai-content {
    background-color: #E3F2FD;
  }
  
  .assistant-message .mermaid-ai-content {
    background-color: #f9f9f9;
  }
  
  /* Responsive Adjustments */
  @media (max-width: 768px) {
    .mermaid-modal-content {
      width: 95vw !important;
      height: 95vh !important;
      padding: 15px;
    }
    
    .mermaid-modal-controls {
      flex-direction: column;
      align-items: stretch;
    }
    
    .mermaid-control-wrapper {
      width: 100%;
    }
    
    .mermaid-content-editor {
      min-height: 100px;
    }
    
    .mermaid-preview-container {
      min-height: 150px;
    }
    
    .mermaid-bottom-controls {
      flex-direction: column;
      gap: 10px;
    }
    
    .mermaid-modal-controls button {
      width: 100%;
    }
    
    .mermaid-export-options {
      flex-direction: column;
    }
    
    .mermaid-ai-editor-container {
      flex-direction: column;
    }
    
    .mermaid-code-container,
    .mermaid-ai-container {
      width: 100%;
    }
  }
  
  /* Accessibility enhancements */
  @media (prefers-reduced-motion: reduce) {
    .mermaid-modal-content,
    .mermaid-modal-close,
    .mermaid-export-button,
    .mermaid-swap-button,
    .mermaid-expand-modal,
    .mermaid-notification-area,
    .mermaid-ai-message {
      transition: none;
      animation: none;
    }
  }
  
  /* High contrast mode */
  @media (prefers-contrast: high) {
    .mermaid-export-button,
    .mermaid-swap-button,
    .mermaid-expand-modal,
    .mermaid-preview-button,
    .mermaid-insert-button,
    .mermaid-modal-save-button,
    .mermaid-modal-export-button,
    .mermaid-format-button,
    .mermaid-reset-view-button,
    .mermaid-ai-send-button,
    .mermaid-extract-code-button {
      background-color: #000000;
      border: 2px solid black;
    }
    
    .mermaid-export-button:hover,
    .mermaid-swap-button:hover,
    .mermaid-expand-modal:hover,
    .mermaid-preview-button:hover,
    .mermaid-insert-button:hover,
    .mermaid-format-button:hover,
    .mermaid-reset-view-button:hover,
    .mermaid-ai-send-button:hover,
    .mermaid-extract-code-button:hover {
      background-color: #0000AA;
    }
    
    .mermaid-container,
    .mermaid-preview-container {
      border: 1px solid #000000;
    }
    
    .mermaid-container:hover {
      border: 1px solid #000;
    }
  }
  
  /* Focus styles for keyboard navigation */
  .mermaid-container:focus-within,
  .mermaid-ai-editor-container:focus-within {
    outline: 3px solid #252758;
    outline-offset: 2px;
  }
  
  .mermaid button:focus,
  .mermaid-modal-content button:focus,
  .mermaid-modal-content select:focus,
  .mermaid-modal-content input:focus,
  .mermaid-content-editor:focus,
  .mermaid-dropdown-button:focus,
  .mermaid-ai-input:focus,
  .mermaid-ai-send-button:focus,
  .mermaid-extract-code-button:focus {
    outline: 2px solid #252758;
    outline-offset: 2px;
  }
  
  /* Diagram Button Styles */
  .mermaid-diagram-btn {
    position: relative;
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 10px 0;
  }
  
  .mermaid-diagram-btn:hover {
    background-color: #4E92B5;
    transform: translateY(-1px);
  }
  
  .mermaid-diagram-btn .badge {
    background-color: #4E92B5;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
  }
  
  .mermaid-diagram-btn.btn-hover .badge {
    background-color: #252758;
  }
  
  /* Remove any margin from Mermaid syntax error messages */
  .mermaid syntax-error {
    margin: 0 !important;
    display: none !important;
  }











  #valor-api-debug-btn {
    transition: opacity 0.3s, background-color 0.3s;
}

#valor-api-debug-btn:hover {
    background-color: #5a6268 !important;
}

.api-debug-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    z-index: 10000;
}

.api-debug-modal h2 {
    margin-top: 0;
    color: #252758;
}

.api-debug-modal table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.api-debug-modal th, .api-debug-modal td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.api-debug-modal th {
    background-color: #f2f2f2;
}

.api-debug-modal .success {
    color: green;
}

.api-debug-modal .error {
    color: red;
}

.api-debug-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}


.open-thread-btn {
    padding: 5px 10px;
    background-color: #252758;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s, opacity 0.3s;
}

.open-thread-btn:hover:not(:disabled) {
    background-color: #3b3f8c;
}

.open-thread-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}



@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


    .thread-info-panel {
      display: none;
      align-items: center;
      background-color: #f0f8ff;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 5px 10px;
      margin: 5px 0;
      font-size: 14px;
    }
    
    .load-threads-btn {
      padding: 5px 10px;
      margin-left: 10px;
      background-color: #252758;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.3s;
    }
    
    .load-threads-btn:hover {
      background-color: #3b3f8c;
    }
    
    .load-threads-btn:disabled {
      background-color: #cccccc;
      cursor: not-allowed;
    }
    
    /* Notification system */
    .thread-notification-area {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }
    
    .notification {
      padding: 12px 16px;
      margin-bottom: 10px;
      border-radius: 4px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      color: #fff;
      max-width: 300px;
      animation: fadeIn 0.3s ease;
      transition: opacity 0.3s, transform 0.3s;
    }
    
    /* Loading indicators */
    .loading-message {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px;
      text-align: center;
    }
    
    .loading-spinner {
      border: 4px solid #f3f3f3;
      border-radius: 50%;
      border-top: 4px solid #252758;
      width: 30px;
      height: 30px;
      animation: spin 1s linear infinite;
      margin-bottom: 10px;
    }
    
    /* Thread content styling */
    .empty-thread-state {
      padding: 40px;
      text-align: center;
    }
    
    .message-sources {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid #eee;
    }
    
    .sources-title {
      font-weight: bold;
      margin-bottom: 5px;
    }
    
    /* Message action controls */
    .message-actions {
      position: absolute;
      top: 8px;
      right: 8px;
      display: none;
    }
    
    .message-container:hover .message-actions {
      display: flex;
    }
    
    .action-btn {
      background: none;
      border: none;
      color: #6c757d;
      cursor: pointer;
      padding: 2px 5px;
      border-radius: 3px;
    }
    
    .action-btn:hover {
      color: #0d6efd;
      background-color: rgba(0,0,0,0.05);
    }
    
    /* Animations */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    @keyframes pulse {
      0%, 100% { opacity: 0.5; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.2); }
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
